Genymobile / scrcpy

Display and control your Android device

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Switch control shortcut option for pc to android or android to pc

idlukakas opened this issue · comments

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

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.