Genymobile / scrcpy

Display and control your Android device
Apache License 2.0
103.03k stars 10.01k forks source link

Forward all clicks by default for UHID and AOA #4877

Open rom1v opened 3 weeks ago

rom1v commented 3 weeks ago

In relative mouse modes (when the cursor appears on the device), it makes more sense to forward all clicks (disable HOME/BACK shortcuts on secondary clicks).

Transform the boolean option --forward-all-clicks into a 3-state option:

That way, by default, all clicks are forwarded with scrcpy -M.

Refs https://github.com/Genymobile/scrcpy/issues/4727#issuecomment-2069869750

rom1v commented 3 weeks ago

Or maybe it would be more consistent to keep --forward-all-clicks as a boolean option, and add a new --no-forward-all-clicks:

# SDK mouse: forward all clicks is disabled
scrcpy
# UHID mouse: forward all clicks is enabled
scrcpy -M

# SDK mouse: force enabled
scrcpy --forward-all-clicks
# UHID mouse: force disabled
scrcpy -M --no-forward-all-clicks

What do you think?