Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change mod/set hardware Search key for OTG mode #2987

Open
1 task done
elig0n opened this issue Jan 29, 2022 · 1 comment
Open
1 task done

change mod/set hardware Search key for OTG mode #2987

elig0n opened this issue Jan 29, 2022 · 1 comment

Comments

@elig0n
Copy link

elig0n commented Jan 29, 2022

Describe the bug
Although mod key shortcuts aren't supposed to work in OTG mode, it is still possible to use android's hardware keyboard shortcuts for basic usage of-which most are using the SEARCH button as a modifier for combinations.

For me it appears that that key is the super/win key and while combinations done with it give rise to no problems so far using the key alone (as in a single press) for its Search/Assistant application cannot and does not work because it already serves to detach the mouse-keyboard capture in scrcpy.

A possible solution can be to set either the hardware Search key or alternatively map the detach functionality from Super to something else (I have already tried the --shortcut-mod option unsuccessfully).

@elig0n elig0n changed the title set hardware Search key in OTG mode change mod/set hardware Search key in OTG mode Jan 29, 2022
@elig0n elig0n changed the title change mod/set hardware Search key in OTG mode change mod/set hardware Search key for OTG mode Jan 29, 2022
@rom1v
Copy link
Collaborator

rom1v commented Jan 30, 2022

I'm ok for adding a new option --mouse-capture-key=key1,key2,…, similar to --shortcut-mod=… introduced in #1598. However, Super is often captured by the host system, so not all combinations will work.

Would you like to work on it?

FYI, I decided to hardcode the mouse capture key to Alt and Super, but I initially considered using the --shortcut-mod value for the capture key, but this is incorrect for two reasons:

  • the --shortcut-mod value might contain a combination of keys (--shortcut-mod=lctrl+lalt+lshift, see shortcuts), while the capture key is only one key (otherwise it would add unnecessary complexity to track press+release actions in all situations, if some keys of the combo is pressed while some other keys are released).
  • the --mouse-capture-key might contain keys other than modifiers (for example F12).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants