I can't get mouse position on Android

USB-mouse has connected on Android device. There is cursor on the screen, but I can’t get its position. I have tried:

  • Get Player Controller → Enable Touch Events → true
  • Get Player Controller → Enable Touch Over Events → true
  • Get Player Controller → Enable Mouse Over Events → true
  • Get Mouse X
  • Get Mouse Position on Viewport
  • Get Mouse Position on Platform
  • Get Player Controller → Get Mouse Position Scaled by DPI
  • Get Player Controller → Get Input Mouse Delta
  • Get Player Controller → Get Hit Result Under Finger
  • Get Player Controller → Get Hit Result Under Cursor
  • Get Player Controller → Get Input Touch State

It is all not working.

In version 4.19.2 - everything works, in version 4.21.2 - not.

It also depends on the version of the android.

For example, I have two devices with Android 8 and Android 5.1.1,
in the first mouse works, in the second - not.

This, apparently, is due to their innovation - new console commands:

Android.EnableMouse

Android.EnableHardwareKeyboard

All the problem is in method HandleInputCB at
Engine/Source/Runtime/Launch/Private/Android/LaunchAndroid.cpp

In my case, I just replaced the function body from version
4.19.2 in 4.21.2.

This solved the problem partially for me.