mirror of
https://github.com/Genymobile/scrcpy.git
synced 2026-01-31 11:34:28 +01:00
Add option to configure mouse bindings
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 <https://github.com/Genymobile/scrcpy/pull/2258#issuecomment-2182394460>
PR #5022 <https://github.com/Genymobile/scrcpy/pull/5022>
This commit is contained in:
@@ -106,15 +106,6 @@ only inverts _x_.
|
||||
This only works for the default mouse mode (`--mouse=sdk`).
|
||||
|
||||
|
||||
## Right-click and middle-click
|
||||
|
||||
By default, right-click triggers BACK (or POWER on) and middle-click triggers
|
||||
HOME. To disable these shortcuts and forward the clicks to the device instead:
|
||||
|
||||
```bash
|
||||
scrcpy --forward-all-clicks
|
||||
```
|
||||
|
||||
## File drop
|
||||
|
||||
### Install APK
|
||||
|
||||
38
doc/mouse.md
38
doc/mouse.md
@@ -68,3 +68,41 @@ debugging disabled (see [OTG](otg.md)).
|
||||
Note: On Windows, it may only work in [OTG mode](otg.md), not while mirroring
|
||||
(it is not possible to open a USB device if it is already open by another
|
||||
process like the _adb daemon_).
|
||||
|
||||
|
||||
## Mouse bindings
|
||||
|
||||
By default, right-click triggers BACK (or POWER on) and middle-click triggers
|
||||
HOME. In addition, the 4th click triggers APP_SWITCH and the 5th click expands
|
||||
the notification panel.
|
||||
|
||||
The shortcuts can be configured using `--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"
|
||||
|
||||
For example:
|
||||
|
||||
```bash
|
||||
scrcpy --mouse-bind=bhsn # the default mode
|
||||
scrcpy --mouse-bind=++++ # forward all clicks
|
||||
scrcpy --mouse-bind=++bh # forward right and middle clicks,
|
||||
# use 4th and 5th for BACK and HOME
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user