Skip to content

Commit b5ed834

Browse files
committed
Update documentation for --no-window
PR #4868 <#4868>
1 parent 65b9f04 commit b5ed834

File tree

5 files changed

+78
-17
lines changed

5 files changed

+78
-17
lines changed

doc/audio.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,17 @@ To disable only the audio playback, see [no playback](video.md#no-playback).
2828

2929
## Audio only
3030

31-
To play audio only, disable the video:
31+
To play audio only, disable video and control:
3232

3333
```bash
34-
scrcpy --no-video
34+
scrcpy --no-video --no-control
35+
```
36+
37+
To play audio without a window:
38+
39+
```bash
40+
# --no-video and --no-control are implied by --no-window
41+
scrcpy --no-window
3542
# interrupt with Ctrl+C
3643
```
3744

doc/control.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,25 @@ scrcpy -n # short version
1515
Read [keyboard](keyboard.md) and [mouse](mouse.md).
1616

1717

18+
## Control only
19+
20+
To control the device without mirroring:
21+
22+
```bash
23+
scrcpy --no-video --no-audio
24+
```
25+
26+
By default, mouse mode is switched to UHID if video mirroring is disabled (a
27+
relative mouse mode is required).
28+
29+
To also use a UHID keyboard, set it explicitly:
30+
31+
```bash
32+
scrcpy --no-video --no-audio --keyboard=uhid
33+
scrcpy --no-video --no-audio -K # short version
34+
```
35+
36+
1837
## Copy-paste
1938

2039
Any time the Android clipboard changes, it is automatically synchronized to the

doc/otg.md

Lines changed: 32 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
# OTG
22

33
By default, _scrcpy_ injects input events at the Android API level. As an
4-
alternative, when connected over USB, it is possible to send HID events, so that
5-
scrcpy behaves as if it was a physical keyboard and/or mouse connected to the
6-
Android device.
4+
alternative, it is possible to send HID events, so that scrcpy behaves as if it
5+
was a [physical keyboard] and/or a [physical mouse] connected to the Android
6+
device (see [keyboard](keyboard.md) and [mouse](mouse.md)).
77

8-
A special mode allows to control the device without mirroring, using AOA
9-
[keyboard](keyboard.md#aoa) and [mouse](mouse.md#aoa). Therefore, it is possible
10-
to run _scrcpy_ with only physical keyboard and mouse simulation (HID), as if
11-
the computer keyboard and mouse were plugged directly to the device via an OTG
12-
cable.
8+
[physical keyboard]: keyboard.md#physical-keyboard-simulation
9+
[physical mouse]: physical-keyboard-simulation
1310

14-
In this mode, `adb` (USB debugging) is not necessary, and mirroring is disabled.
11+
A special mode (OTG) allows to control the device using AOA
12+
[keyboard](keyboard.md#aoa) and [mouse](mouse.md#aoa), without using _adb_ at
13+
all (so USB debugging is not necessary). In this mode, video and audio are
14+
disabled, and `--keyboard=aoa and `--mouse=aoa` are implicitly set.
1515

16-
This is similar to `--keyboard=aoa --mouse=aoa`, but without mirroring.
16+
Therefore, it is possible to run _scrcpy_ with only physical keyboard and mouse
17+
simulation, as if the computer keyboard and mouse were plugged directly to the
18+
device via an OTG cable.
1719

1820
To enable OTG mode:
1921

@@ -23,7 +25,7 @@ scrcpy --otg
2325
scrcpy --otg -s 0123456789abcdef
2426
```
2527

26-
It is possible to disable HID keyboard or HID mouse:
28+
It is possible to disable keyboard or mouse:
2729

2830
```bash
2931
scrcpy --otg --keyboard=disabled
@@ -35,3 +37,22 @@ It only works if the device is connected over USB.
3537
## OTG issues on Windows
3638

3739
See [FAQ](/FAQ.md#otg-issues-on-windows).
40+
41+
42+
## Control-only
43+
44+
Note that the purpose of OTG is to control the device without USB debugging
45+
(adb).
46+
47+
If you want to solely control the device without mirroring while USB debugging
48+
is enabled, then OTG mode is not necessary.
49+
50+
Instead, disable video and audio, and select UHID (or AOA):
51+
52+
```bash
53+
scrcpy --no-video --no-audio --keyboard=uhid --mouse=uhid
54+
scrcpy --no-video --no-audio -KM # short version
55+
scrcpy --no-video --no-audio --keyboard=aoa --mouse=aoa
56+
```
57+
58+
One benefit of UHID is that it also works wirelessly.

doc/recording.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,10 @@ orientation](video.md#orientation).
5858

5959
## No playback
6060

61-
To disable playback while recording:
61+
To disable playback and control while recording:
6262

6363
```bash
64-
scrcpy --no-playback --record=file.mp4
65-
scrcpy -Nr file.mkv
66-
# interrupt recording with Ctrl+C
64+
scrcpy --no-playback --no-control --record=file.mp4
6765
```
6866

6967
It is also possible to disable video and audio playback separately:
@@ -73,6 +71,13 @@ It is also possible to disable video and audio playback separately:
7371
scrcpy --record=file.mkv --no-audio-playback
7472
```
7573

74+
To also disable the window:
75+
76+
```bash
77+
scrcpy --no-playback --no-window --record=file.mp4
78+
# interrupt recording with Ctrl+C
79+
```
80+
7681
## Time limit
7782

7883
To limit the recording time:

doc/window.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Window
22

3+
## Disable window
4+
5+
To disable window (may be useful for recording or for playing audio only):
6+
7+
```bash
8+
scrcpy --no-window --record=file.mp4
9+
# Ctrl+C to interrupt
10+
```
11+
312
## Title
413

514
By default, the window title is the device model. It can be changed:

0 commit comments

Comments
 (0)