-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
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 OTG mode (HID only) #2974
Add OTG mode (HID only) #2974
Conversation
This is awesome! Nice work! |
7e8a942
to
c0de365
Compare
Add an option --otg to run scrcpy with only physical keyboard and mouse simulation (HID over AOA), without mirroring and without requiring adb. To avoid adding complexity into the scrcpy initialization and screen implementation, OTG mode is implemented totally separately, with a separate window. PR #2974 <#2974>
@rom1v Would it be possible to also add mirroring to this OTG mode which doesn't require USB debugging? This would be especially useful for broken screens :'D thanks in advance |
@BachoSeven This is not possible without installing an app on the device and authorizing capture, so that would not work with a broken screen. |
I tried installing scrcpy v1.22 on Ubuntu 20.04 thru snap but the terminal shows my scrcpy is still v1.12? How do I run v1.22 in Ubuntu 20.04? |
Uninstall the one from the distribution ( |
Add an option
--otg
to run scrcpy with only physical keyboard (#2632) and mouse (#2916) simulation, without mirroring and without requiring adb (USB debugging), as if the computer keyboard and mouse were plugged directly to the device via an OTG cable.scrcpy --otg # Pass the serial if several USB devices are available scrcpy --otg -s 0123456789abcdef
This opens a window (with just the scrcpy logo, there is no mirroring), which when focused forwards the keyboard and mouse to the device:
The mouse capture works the same way as in "normal" mode (as explained in #2916):
Like
--hid-keyboard
and--hid-mouse
,--otg
only works if the device is connected by USB, and is currently only supported on Linux.