Use <kbd> HTML tag for keys
It's prettyier in a browser.
This commit is contained in:
parent
dfb7324d7b
commit
d49cffb938
1 changed files with 61 additions and 56 deletions
117
README.md
117
README.md
|
@ -354,7 +354,7 @@ scrcpy --fullscreen
|
||||||
scrcpy -f # short version
|
scrcpy -f # short version
|
||||||
```
|
```
|
||||||
|
|
||||||
Fullscreen can then be toggled dynamically with `MOD`+`f`.
|
Fullscreen can then be toggled dynamically with <kbd>MOD</kbd>+<kbd>f</kbd>.
|
||||||
|
|
||||||
#### Rotation
|
#### Rotation
|
||||||
|
|
||||||
|
@ -370,18 +370,19 @@ Possibles values are:
|
||||||
- `2`: 180 degrees
|
- `2`: 180 degrees
|
||||||
- `3`: 90 degrees clockwise
|
- `3`: 90 degrees clockwise
|
||||||
|
|
||||||
The rotation can also be changed dynamically with `MOD`+`←` _(left)_ and
|
The rotation can also be changed dynamically with <kbd>MOD</kbd>+<kbd>←</kbd>
|
||||||
`MOD`+`→` _(right)_.
|
_(left)_ and <kbd>MOD</kbd>+<kbd>→</kbd> _(right)_.
|
||||||
|
|
||||||
Note that _scrcpy_ manages 3 different rotations:
|
Note that _scrcpy_ manages 3 different rotations:
|
||||||
- `MOD`+`r` requests the device to switch between portrait and landscape (the
|
- <kbd>MOD</kbd>+<kbd>r</kbd> requests the device to switch between portrait and
|
||||||
current running app may refuse, if it does support the requested
|
landscape (the current running app may refuse, if it does support the
|
||||||
orientation).
|
requested orientation).
|
||||||
- `--lock-video-orientation` changes the mirroring orientation (the orientation
|
- `--lock-video-orientation` changes the mirroring orientation (the orientation
|
||||||
of the video sent from the device to the computer). This affects the
|
of the video sent from the device to the computer). This affects the
|
||||||
recording.
|
recording.
|
||||||
- `--rotation` (or `MOD`+`←`/`MOD`+`→`) rotates only the window content. This
|
- `--rotation` (or <kbd>MOD</kbd>+<kbd>←</kbd>/<kbd>MOD</kbd>+<kbd>→</kbd>)
|
||||||
affects only the display, not the recording.
|
rotates only the window content. This affects only the display, not the
|
||||||
|
recording.
|
||||||
|
|
||||||
|
|
||||||
### Other mirroring options
|
### Other mirroring options
|
||||||
|
@ -437,9 +438,10 @@ scrcpy --turn-screen-off
|
||||||
scrcpy -S
|
scrcpy -S
|
||||||
```
|
```
|
||||||
|
|
||||||
Or by pressing `MOD`+`o` at any time.
|
Or by pressing <kbd>MOD</kbd>+<kbd>o</kbd> at any time.
|
||||||
|
|
||||||
To turn it back on, press `MOD`+`Shift`+`o` (or `POWER`, `MOD`+`p`).
|
To turn it back on, press <kbd>MOD</kbd>+<kbd>Shift</kbd>+<kbd>o</kbd> (or
|
||||||
|
`POWER`, <kbd>MOD</kbd>+<kbd>p</kbd>).
|
||||||
|
|
||||||
It can be useful to also prevent the device to sleep:
|
It can be useful to also prevent the device to sleep:
|
||||||
|
|
||||||
|
@ -494,7 +496,8 @@ scrcpy --disable-screensaver
|
||||||
|
|
||||||
#### Rotate device screen
|
#### Rotate device screen
|
||||||
|
|
||||||
Press `MOD`+`r` to switch between portrait and landscape modes.
|
Press <kbd>MOD</kbd>+<kbd>r</kbd> to switch between portrait and landscape
|
||||||
|
modes.
|
||||||
|
|
||||||
Note that it rotates only if the application in foreground supports the
|
Note that it rotates only if the application in foreground supports the
|
||||||
requested orientation.
|
requested orientation.
|
||||||
|
@ -504,32 +507,34 @@ requested orientation.
|
||||||
Any time the Android clipboard changes, it is automatically synchronized to the
|
Any time the Android clipboard changes, it is automatically synchronized to the
|
||||||
computer clipboard.
|
computer clipboard.
|
||||||
|
|
||||||
Any `Ctrl` shortcut is forwarded to the device. In particular:
|
Any <kbd>Ctrl</kbd> shortcut is forwarded to the device. In particular:
|
||||||
- `Ctrl`+`c` typically copies
|
- <kbd>Ctrl</kbd>+<kbd>c</kbd> typically copies
|
||||||
- `Ctrl`+`x` typically cuts
|
- <kbd>Ctrl</kbd>+<kbd>x</kbd> typically cuts
|
||||||
- `Ctrl`+`v` typically pastes (after computer-to-device clipboard
|
- <kbd>Ctrl</kbd>+<kbd>v</kbd> typically pastes (after computer-to-device
|
||||||
synchronization)
|
clipboard synchronization)
|
||||||
|
|
||||||
This typically works as you expect.
|
This typically works as you expect.
|
||||||
|
|
||||||
The actual behavior depends on the active application though. For example,
|
The actual behavior depends on the active application though. For example,
|
||||||
_Termux_ sends SIGINT on `Ctrl`+`c` instead, and _K-9 Mail_ composes a new
|
_Termux_ sends SIGINT on <kbd>Ctrl</kbd>+<kbd>c</kbd> instead, and _K-9 Mail_
|
||||||
message.
|
composes a new message.
|
||||||
|
|
||||||
To copy, cut and paste in such cases (but only supported on Android >= 7):
|
To copy, cut and paste in such cases (but only supported on Android >= 7):
|
||||||
- `MOD`+`c` injects `COPY`
|
- <kbd>MOD</kbd>+<kbd>c</kbd> injects `COPY`
|
||||||
- `MOD`+`x` injects `CUT`
|
- <kbd>MOD</kbd>+<kbd>x</kbd> injects `CUT`
|
||||||
- `MOD`+`v` injects `PASTE` (after computer-to-device clipboard
|
- <kbd>MOD</kbd>+<kbd>v</kbd> injects `PASTE` (after computer-to-device
|
||||||
synchronization)
|
clipboard synchronization)
|
||||||
|
|
||||||
In addition, `MOD`+`Shift`+`v` allows to inject the computer clipboard text as a
|
In addition, <kbd>MOD</kbd>+<kbd>Shift</kbd>+<kbd>v</kbd> allows to inject the
|
||||||
sequence of key events. This is useful when the component does not accept text
|
computer clipboard text as a sequence of key events. This is useful when the
|
||||||
pasting (for example in _Termux_), but it can break non-ASCII content.
|
component does not accept text pasting (for example in _Termux_), but it can
|
||||||
|
break non-ASCII content.
|
||||||
|
|
||||||
**WARNING:** Pasting the computer clipboard to the device (either via `Ctrl`+`v`
|
**WARNING:** Pasting the computer clipboard to the device (either via
|
||||||
or `MOD`+`v`) copies the content into the device clipboard. As a consequence,
|
<kbd>Ctrl</kbd>+<kbd>v</kbd> or <kbd>MOD</kbd>+<kbd>v</kbd>) copies the content
|
||||||
any Android application could read its content. You should avoid to paste
|
into the device clipboard. As a consequence, any Android application could read
|
||||||
sensitive content (like passwords) that way.
|
its content. You should avoid to paste sensitive content (like passwords) that
|
||||||
|
way.
|
||||||
|
|
||||||
#### Text injection preference
|
#### Text injection preference
|
||||||
|
|
||||||
|
@ -589,8 +594,8 @@ Also see [issue #14].
|
||||||
|
|
||||||
## Shortcuts
|
## Shortcuts
|
||||||
|
|
||||||
In the following list, `MOD` is the shortcut modifier. By default, it's (left)
|
In the following list, <kbd>MOD</kbd> is the shortcut modifier. By default, it's
|
||||||
`Alt` or (left) `Super`.
|
(left) <kbd>Alt</kbd> or (left) <kbd>Super</kbd>.
|
||||||
|
|
||||||
It can be changed using `--shortcut-mod`. Possible keys are `lctrl`, `rctrl`,
|
It can be changed using `--shortcut-mod`. Possible keys are `lctrl`, `rctrl`,
|
||||||
`lalt`, `ralt`, `lsuper` and `rsuper`. For example:
|
`lalt`, `ralt`, `lsuper` and `rsuper`. For example:
|
||||||
|
@ -603,42 +608,42 @@ scrcpy --shortcut-mod=rctrl
|
||||||
scrcpy --shortcut-mod=lctrl+lalt,lsuper
|
scrcpy --shortcut-mod=lctrl+lalt,lsuper
|
||||||
```
|
```
|
||||||
|
|
||||||
_[Super] is typically the "Windows" or "Cmd" key._
|
_<kbd>[Super]</kbd> is typically the <kbd>Windows</kbd> or <kbd>Cmd</kbd> key._
|
||||||
|
|
||||||
[Super]: https://en.wikipedia.org/wiki/Super_key_(keyboard_button)
|
[Super]: https://en.wikipedia.org/wiki/Super_key_(keyboard_button)
|
||||||
|
|
||||||
| Action | Shortcut
|
| Action | Shortcut
|
||||||
| ------------------------------------------- |:-----------------------------
|
| ------------------------------------------- |:-----------------------------
|
||||||
| Switch fullscreen mode | `MOD`+`f`
|
| Switch fullscreen mode | <kbd>MOD</kbd>+<kbd>f</kbd>
|
||||||
| Rotate display left | `MOD`+`←` _(left)_
|
| Rotate display left | <kbd>MOD</kbd>+<kbd>←</kbd> _(left)_
|
||||||
| Rotate display right | `MOD`+`→` _(right)_
|
| Rotate display right | <kbd>MOD</kbd>+<kbd>→</kbd> _(right)_
|
||||||
| Resize window to 1:1 (pixel-perfect) | `MOD`+`g`
|
| Resize window to 1:1 (pixel-perfect) | <kbd>MOD</kbd>+<kbd>g</kbd>
|
||||||
| Resize window to remove black borders | `MOD`+`w` \| _Double-click¹_
|
| Resize window to remove black borders | <kbd>MOD</kbd>+<kbd>w</kbd> \| _Double-click¹_
|
||||||
| Click on `HOME` | `MOD`+`h` \| _Middle-click_
|
| Click on `HOME` | <kbd>MOD</kbd>+<kbd>h</kbd> \| _Middle-click_
|
||||||
| Click on `BACK` | `MOD`+`b` \| _Right-click²_
|
| Click on `BACK` | <kbd>MOD</kbd>+<kbd>b</kbd> \| _Right-click²_
|
||||||
| Click on `APP_SWITCH` | `MOD`+`s`
|
| Click on `APP_SWITCH` | <kbd>MOD</kbd>+<kbd>s</kbd>
|
||||||
| Click on `MENU` | `MOD`+`m`
|
| Click on `MENU` | <kbd>MOD</kbd>+<kbd>m</kbd>
|
||||||
| Click on `VOLUME_UP` | `MOD`+`↑` _(up)_
|
| Click on `VOLUME_UP` | <kbd>MOD</kbd>+<kbd>↑</kbd> _(up)_
|
||||||
| Click on `VOLUME_DOWN` | `MOD`+`↓` _(down)_
|
| Click on `VOLUME_DOWN` | <kbd>MOD</kbd>+<kbd>↓</kbd> _(down)_
|
||||||
| Click on `POWER` | `MOD`+`p`
|
| Click on `POWER` | <kbd>MOD</kbd>+<kbd>p</kbd>
|
||||||
| Power on | _Right-click²_
|
| Power on | _Right-click²_
|
||||||
| Turn device screen off (keep mirroring) | `MOD`+`o`
|
| Turn device screen off (keep mirroring) | <kbd>MOD</kbd>+<kbd>o</kbd>
|
||||||
| Turn device screen on | `MOD`+`Shift`+`o`
|
| Turn device screen on | <kbd>MOD</kbd>+<kbd>Shift</kbd>+<kbd>o</kbd>
|
||||||
| Rotate device screen | `MOD`+`r`
|
| Rotate device screen | <kbd>MOD</kbd>+<kbd>r</kbd>
|
||||||
| Expand notification panel | `MOD`+`n`
|
| Expand notification panel | <kbd>MOD</kbd>+<kbd>n</kbd>
|
||||||
| Collapse notification panel | `MOD`+`Shift`+`n`
|
| Collapse notification panel | <kbd>MOD</kbd>+<kbd>Shift</kbd>+<kbd>n</kbd>
|
||||||
| Copy to clipboard³ | `MOD`+`c`
|
| Copy to clipboard³ | <kbd>MOD</kbd>+<kbd>c</kbd>
|
||||||
| Cut to clipboard³ | `MOD`+`x`
|
| Cut to clipboard³ | <kbd>MOD</kbd>+<kbd>x</kbd>
|
||||||
| Synchronize clipboards and paste³ | `MOD`+`v`
|
| Synchronize clipboards and paste³ | <kbd>MOD</kbd>+<kbd>v</kbd>
|
||||||
| Inject computer clipboard text | `MOD`+`Shift`+`v`
|
| Inject computer clipboard text | <kbd>MOD</kbd>+<kbd>Shift</kbd>+<kbd>v</kbd>
|
||||||
| Enable/disable FPS counter (on stdout) | `MOD`+`i`
|
| Enable/disable FPS counter (on stdout) | <kbd>MOD</kbd>+<kbd>i</kbd>
|
||||||
|
|
||||||
_¹Double-click on black borders to remove them._
|
_¹Double-click on black borders to remove them._
|
||||||
_²Right-click turns the screen on if it was off, presses BACK otherwise._
|
_²Right-click turns the screen on if it was off, presses BACK otherwise._
|
||||||
_³Only on Android >= 7._
|
_³Only on Android >= 7._
|
||||||
|
|
||||||
All `Ctrl`+_key_ shortcuts are forwarded to the device, so they are handled by
|
All <kbd>Ctrl</kbd>+_key_ shortcuts are forwarded to the device, so they are
|
||||||
the active application.
|
handled by the active application.
|
||||||
|
|
||||||
|
|
||||||
## Custom paths
|
## Custom paths
|
||||||
|
|
Loading…
Reference in a new issue