Genymobile / scrcpy

Display and control your Android device
Apache License 2.0
106.15k stars 10.28k forks source link

High latency on numpad keys for certain apps #1773

Open fefo-dev opened 3 years ago

fefo-dev commented 3 years ago

In DraStic (Nintendo DS emulator) if I set a controller bind as a numpad button it only register an input if I hold it for a moment, while other keys work as expected. The odd thing is that on the mapping menu I get no delay, only in-game. Other apps I tested at random saw no delay.

Android 9, ABNT keyboard on computer side (changing to en-us did no difference), --prefer-text flag off as it causes intended delay.

Thanks.

rom1v commented 3 years ago

Try --no-key-repeat? See #1623 #1013

fefo-dev commented 3 years ago

Found no noticeable difference with and without this flag.

Using another emulator for tests (M64Plus FZ, for Nintendo 64) I was able to reproduce the same issue. This emulator has a Controller Diagnosis feature inside the Help tab which displays the numpad and the upper row numkeys as the same input from scrpcy, with the same issue in game. From my tests only numpad Enter behaved correctly, as does normal Enter, so there might be more keys with this issue.

I still have no clue if this is an scrcpy issue or a app issue. Both apps have on issue in the main app UI, so maybe it's something about how they render the game? No idea.

playbyan1453 commented 3 years ago

I have a same issue like playing minecraft, but it didn't have any latency when I pressed the key but when I not pressing the key it have a delay like 500ms ~ 1000ms then the player movement stops. Also when holding keyboard keys with holding left click the delay much more bigger than 1 second. maybe this is adb bug not scrcpy one.