v1.15

Genymobile/scrcpyv1.15Aug 6, 2020by rom1v

AI Summary

Introduces forwarding of Ctrl and Shift keys to the device, customizable shortcut modifiers, and major improvements to copy-paste functionality.

Key Highlights

  • Forwarding of Ctrl and Shift keys allows triggering device shortcuts (e.g., Ctrl+C/X/V).
  • Customizable shortcut modifier (`--shortcut-mod`) to change the 'MOD' key.
  • Seamless copy-paste improvements and increased clipboard size (256k).
  • Improved screen off/on behavior to restore power mode on disconnection.

New Features

  • Ctrl and Shift forwarding
  • Customizable shortcut modifier
  • Seamless copy-paste
  • Screen off improvements
  • Repeating key events handling
  • Disable screensaver option

Full Release Notes

_To receive a notification on new releases, click on **Watch > Releases only** on the top._

---

**scrcpy v1.15**

Changes since v1.14:
 - Forward Ctrl and Shift to the device (#1598, #555, #942)
 - Change "resize to fit" shortcut from MOD+x to MOD+w (#1598)
 - Make shortcut modifiers customizable (#1598)
 - Restore power mode to "normal" on disconnection (#1572, #1576)
 - Keep the screen off on powering on (best effort) (#1573, #1577)
 - Add option to disable screensaver (#1370, #1502)
 - Do not crash on missing clipboard manager (#1440, #1556)
 - Fix touch events HiDPI-scaling (#1536, #15)
 - Correctly inject repeating keycodes (#1013, #1519)
 - Add option to ignore repeated key events (#1013, #1623)
 - Increase clipboard size from 4k to 256k (#1117)
 - Do not expose internal SDL logs to users (#1441)
 - Upgrade platform-tools to 30.0.4 (adb) in Windows releases
 - Upgrade FFmpeg to 4.3.1 in Windows releases

---


# Highlights

## Ctrl and Shift

<kbd>Ctrl</kbd> and <kbd>Shift</kbd> keys are now forwarded to the device.

This allows to trigger many shortcuts on the device itself. For example, <kbd>Ctrl</kbd>+<kbd>t</kbd> in Firefox opens a new tab, <kbd>Ctrl</kbd>+<kbd>w</kbd> closes the current tab. <kbd>Ctrl</kbd>+<kbd>c</kbd> or <kbd>Ctrl</kbd>+<kbd>d</kbd> can now be injected in Termux. <kbd>Ctrl</kbd>+<kbd>z</kbd> could be used to cancel an action, like a change in a text field for example.

This also greatly simplifies text selection, by using the keyboard (<kbd>Shift</kbd>+_arrows_, <kbd>Ctrl</kbd>+<kbd>a</kbd>…). And it makes copy-paste more straightforward (see below).


## Customizable shortcut modifier

Since <kbd>Ctrl</kbd> is now forwarded to the device, scrcpy must use another shortcut modifier (called <kbd>MOD</kbd> in the documentation). By default, it's either (left) <kbd>Alt</kbd> or (left) <kbd>[Super]</kbd>.

[Super]: https://en.wikipedia.org/wiki/Super_key_(keyboard_button)

The shortcut modifier can be changed by a command-line parameter (`--shortcut-mod`). Here are some examples:

```bash
# use RCtrl for shortcuts
scrcpy --shortcut-mod=rctrl
# use either LAlt or RCtrl
scrcpy --shortcut-mod=lalt,rctrl
# use LCtrl+LAlt
scrcpy --shortcut-mod=lctrl+lalt
# use LCtrl+LAlt or Super
scrcpy --shortcut-mod=lctrl+lalt,lsuper,rsuper
```


## Seamless copy-paste

Forwarding <kbd>Ctrl</kbd> brings a lot of changes and improvements regarding copy-paste:

 - To copy or cut a text, <kbd>Ctrl</kbd>+<kbd>c</kbd> and <kbd>Ctrl</kbd>+<kbd>x</kbd> typically work, because they are forwarded to the device, which, in a text field, copies the text into the clipboard… and the clipboard is now automatically (since v1.14) synchronized with the computer keyboard.
 - Pressing <kbd>Ctrl</kbd>+<kbd>v</kbd> synchronizes the computer clipboard to the device before sending the key event, therefore pasting typically works seamlessly.
 - Seamless copy-paste introduced in [v1.14](https://github.com/Genymobile/scrcpy/releases/tag/v1.14) was limited if Android <= 7; by using <kbd>Ctrl</kbd> keys, it now works on all supported versions.
 - <kbd>MOD</kbd>+<kbd>c</kbd>, <kbd>MOD</kbd>+<kbd>x</kbd> and <kbd>MOD</kbd>+<kbd>v</kbd> are also provided to inject <kbd>COPY</kbd>, <kbd>CUT</kbd> and <kbd>PASTE</kbd> keycodes (see [README](https://github.com/Genymobile/scrcpy/blob/v1.15/README.md#copy-paste) for details).
 - <kbd>MOD</kbd>+<kbd>Shift</kbd>+<kbd>v</kbd> injects the computer clipboard content as a sequence of key events (it was <kbd>Ctrl</kbd>+<kbd>v</kbd> on previous versions, this is still useful sometimes).
 - to be able to bind <kbd>CUT</kbd> to <kbd>MOD</kbd>+<kbd>x</kbd>, the "resize to fit" shortcut (which removes the black borders) has been changed to <kbd>MOD</kbd>+<kbd>w</kbd>.

The clipboard size has also been increased from 4k to 256k.


## Screen off improvements

<kbd>MOD</kbd>+<kbd>o</kbd> (or `--turn-screen-off`) allows to mirror with physical screen turned off.

However, the physical screen was not automatically restored on disconnection, which was annoying. Now it is.

In addition, on Android, pressing <kbd>POWER</kbd> cancels the effect of _turn screen off_. For convenience, scrcpy now attempts to maintain the screen off when it generates a <kbd>POWER</kbd> event (either via right-click or <kbd>MOD</kbd>+<kbd>p</kbd>).


## Repeating key events

When a key is hold pressed, the system generates repeated key events.

The repeat count is now correctly forwarded to Android, and an option (`--no-key-repeat`) has been added to completely disable them. This mitigates keyboard lag in some games.