Open idlukakas opened 6 months ago
The SDL window must have focus to receive keyboard (or mouse) events.
Scrcpy server can bind some shortcut from the desktop OS to gain focus on it's window if possible.
I did: scrcpy.exe --stay-awake --push-target=/sdcard/ --no-video -KM --window-height=50 --window-width=50 --window-x 940 --window-y 1090 --window-borderless
Then I set AutoHotKey to gain focus the scrcpy window and click on it automatically when I press Alt + S
Thanks for explain the behavior
Refs https://wiki.libsdl.org/SDL2/SDL_SetWindowKeyboardGrab (but not sure this allows to do what we want)
Good to know. Who knows, it could be reachable for using it.
By using the command scrcpy.exe -KM --no-video, I can only gain control of the Android device if I click on the scrcpy window, and to release control back to the PC, I need to press Alt. It would be nice if I could switch control between the PC and the Android device using a shortcut.
Perhaps using an option like: scrcpy.exe -KM --no-video --switch-control-shortcut