scrcpy/doc/otg.md
Romain Vimont b9d244b4c9 Document UHID
Rework the documentation to present the keyboard and mouse input modes.

PR #4473 <https://github.com/Genymobile/scrcpy/pull/4473>
2024-03-01 00:52:28 +01:00

1.1 KiB

OTG

By default, scrcpy injects input events at the Android API level. As an alternative, when connected over USB, it is possible to send HID events, so that scrcpy behaves as if it was a physical keyboard and/or mouse connected to the Android device.

A special mode allows to control the device without mirroring, using AOA keyboard and mouse. Therefore, it is possible to run scrcpy with only physical keyboard and mouse simulation (HID), as if the computer keyboard and mouse were plugged directly to the device via an OTG cable.

In this mode, adb (USB debugging) is not necessary, and mirroring is disabled.

This is similar to --keyboard=aoa --mouse=aoa, but without mirroring.

To enable OTG mode:

scrcpy --otg
# Pass the serial if several USB devices are available
scrcpy --otg -s 0123456789abcdef

It is possible to disable HID keyboard or HID mouse:

scrcpy --otg --keyboard=disabled
scrcpy --otg --mouse=disabled

It only works if the device is connected over USB.

OTG issues on Windows

See FAQ.