Reassign -K and -M to UHID keyboard and mouse

The options were deprecated, but for convenience, reassign them to
aliases for --keyboard=uhid and --mouse=uhid respectively.

Their long version (--hid-keyboard and --hid-mouse) remain deprecated.

PR #4473 <https://github.com/Genymobile/scrcpy/pull/4473>
This commit is contained in:
Romain Vimont 2024-02-25 18:35:52 +01:00
commit 1c5ad0e813
4 changed files with 36 additions and 17 deletions

View file

@ -27,6 +27,7 @@ _scrcpy() {
--force-adb-forward
--forward-all-clicks
-h --help
-K
--keyboard=
--kill-adb-on-close
--legacy-paste
@ -37,6 +38,7 @@ _scrcpy() {
--lock-video-orientation
--lock-video-orientation=
-m --max-size=
-M
--max-fps=
--mouse=
-n --no-control

View file

@ -34,6 +34,7 @@ arguments=(
'--force-adb-forward[Do not attempt to use \"adb reverse\" to connect to the device]'
'--forward-all-clicks[Forward clicks to device]'
{-h,--help}'[Print the help]'
'-K[Use UHID keyboard (same as --keyboard=uhid)]'
'--keyboard[Set the keyboard input mode]:mode:(disabled sdk uhid aoa)'
'--kill-adb-on-close[Kill adb when scrcpy terminates]'
'--legacy-paste[Inject computer clipboard text as a sequence of key events on Ctrl+v]'
@ -43,6 +44,7 @@ arguments=(
'--list-encoders[List video and audio encoders available on the device]'
'--lock-video-orientation=[Lock video orientation]:orientation:(unlocked initial 0 90 180 270)'
{-m,--max-size=}'[Limit both the width and height of the video to value]'
'-M[Use UHID mouse (same as --mouse=uhid)]'
'--max-fps=[Limit the frame rate of screen capture]'
'--mouse[Set the mouse input mode]:mode:(disabled sdk uhid aoa)'
{-n,--no-control}'[Disable device control \(mirror the device in read only\)]'