-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
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
Add option to configure mouse bindings #5022
Conversation
Add a new option --mouse-bind=xxxx. The argument must be exactly 4 characters, one for each secondary click: --mouse-bind=xxxx ^^^^ |||| ||| `- 5th click || `-- 4th click | `--- middle click `---- right click Each character must be one of the following: - `+`: forward the click to the device - `-`: ignore the click - `b`: trigger shortcut BACK (or turn screen on if off) - `h`: trigger shortcut HOME - `s`: trigger shortcut APP_SWITCH - `n`: trigger shortcut "expand notification panel" This deprecates --forward-all-clicks (use --mouse-bind=++++ instead). Refs <#2258 (comment)> PR #5022 <#5022>
By default, only the left click is forwarded to the device, and secondary clicks trigger shortcuts (the behavior can be configured by --mouse-bind=xxxx). But when the mouse mode is relative (AOA and UHID modes), forward all clicks by default. This makes more sense since the cursor is handled on the device side, the user expects all mouse buttons to be forwarded. Refs <#4727 (comment)> PR #5022 <#5022>
I'm not sure about the second part (forwarding all clicks by default only for AOA and UHID), that might add confusion. Maybe keeping the shortcuts |
@rom1v I've tested it, and I'm glad to report that everything worked as expected. I didn't encounter any issues. However, I do have one question: Once I've set the keybinds, do I need to set them again the next time I use the program, or does it remember them? |
Thank you for the feedback 👍
Scrcpy does not remember anything, all configuration is passed via command line arguments. But you can just add the arguments you want in a script: https://github.com/Genymobile/scrcpy/blob/master/doc/windows.md#run |
🚀 |
Add a new option --mouse-bind=xxxx. The argument must be exactly 4 characters, one for each secondary click: --mouse-bind=xxxx ^^^^ |||| ||| `- 5th click || `-- 4th click | `--- middle click `---- right click Each character must be one of the following: - `+`: forward the click to the device - `-`: ignore the click - `b`: trigger shortcut BACK (or turn screen on if off) - `h`: trigger shortcut HOME - `s`: trigger shortcut APP_SWITCH - `n`: trigger shortcut "expand notification panel" This deprecates --forward-all-clicks (use --mouse-bind=++++ instead). Refs <Genymobile#2258 (comment)> PR Genymobile#5022 <Genymobile#5022>
By default, only the left click is forwarded to the device, and secondary clicks trigger shortcuts (the behavior can be configured by --mouse-bind=xxxx). But when the mouse mode is relative (AOA and UHID modes), forward all clicks by default. This makes more sense since the cursor is handled on the device side, the user expects all mouse buttons to be forwarded. Refs <Genymobile#4727 (comment)> PR Genymobile#5022 <Genymobile#5022>
Add a new option --mouse-bind=xxxx. The argument must be exactly 4 characters, one for each secondary click: --mouse-bind=xxxx ^^^^ |||| ||| `- 5th click || `-- 4th click | `--- middle click `---- right click Each character must be one of the following: - `+`: forward the click to the device - `-`: ignore the click - `b`: trigger shortcut BACK (or turn screen on if off) - `h`: trigger shortcut HOME - `s`: trigger shortcut APP_SWITCH - `n`: trigger shortcut "expand notification panel" This deprecates --forward-all-clicks (use --mouse-bind=++++ instead). Refs <Genymobile#2258 (comment)> PR Genymobile#5022 <Genymobile#5022>
By default, only the left click is forwarded to the device, and secondary clicks trigger shortcuts (the behavior can be configured by --mouse-bind=xxxx). But when the mouse mode is relative (AOA and UHID modes), forward all clicks by default. This makes more sense since the cursor is handled on the device side, the user expects all mouse buttons to be forwarded. Refs <Genymobile#4727 (comment)> PR Genymobile#5022 <Genymobile#5022>
The argument must be exactly 4 characters, one for each secondary click:
Each character must be one of the following:
+
: forward the click to the device-
: ignore the clickb
: trigger shortcut BACK (or turn screen on if off)h
: trigger shortcut HOMEs
: trigger shortcut APP_SWITCHn
: trigger shortcut "expand notification panel"For example:
This deprecates
--forward-all-clicks
(use--mouse-bind=++++
instead).Refs #2258 (comment)
Also forward all clicks by default for UHID/AOA
By default, only the left click is forwarded to the device, and secondary clicks trigger shortcuts (the behavior can now be configured by
--mouse-bind=xxxx
).But when the mouse mode is relative (AOA and UHID modes), forward all clicks by default. This makes more sense since the cursor is handled on the device side, the user expects all mouse buttons to be forwarded.
Refs #4727 (comment)
Supersedes #4877