From c5be0d6438c14a059fc4b581b2645fce6b6666cd Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Wed, 26 Jan 2022 22:30:57 +0100 Subject: [PATCH] Document OTG mode in README PR #2974 --- README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/README.md b/README.md index 9eb4bd21..af0e54f7 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,7 @@ Its features include: (Linux-only) - [physical mouse simulation (HID)](#physical-mouse-simulation-hid) (Linux-only) + - [OTG mode](#otg) (Linux-only) - and moreā€¦ ## Requirements @@ -849,6 +850,26 @@ Special capture keys, either Alt or Super, toggle the mouse back to the computer. +#### OTG + +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. + +To enable OTG mode: + +```bash +scrcpy --otg +# Pass the serial if several USB devices are available +scrcpy --otg -s 0123456789abcdef +``` + +Like `--hid-keyboard` and `--hid-mouse`, it only works if the device is +connected by USB, and is currently only supported on Linux. + + #### Text injection preference There are two kinds of [events][textevents] generated when typing text: