v1.9
Genymobile/scrcpyv1.9Jun 11, 2019by rom1v
AI Summary
v1.9 adds bidirectional clipboard support and the ability to turn off the device screen while mirroring. It also fixes various usability issues regarding mouse focus and Windows executable path handling.
Key Highlights
- Bidirectional clipboard copy (Ctrl+C to copy from device, Ctrl+Shift+V to copy to device).
- Turn device screen off while mirroring via Ctrl+O.
- Windows PATH simplification so scrcpy-server.jar works out-of-the-box without environment variables.
- Fixed mouse focus clickthrough regression.
- Added 'Always on top' window option.
New Features
- Turn screen off functionality
- Bidirectional clipboard
- Always on top option
- Render expired frames option
Full Release Notes
scrcpy v1.9
Changes since v1.8:
- Add feature to turn screen off while mirroring (#175)
- Add device-to-computer clipboard copy (#145)
- Add computer-to-device clipboard copy (#413)
- Find scrcpy-server.jar in the correct directory on Windows
- Fix mouse focus clickthrough
- Do not minimize the window on focus loss (#554)
- Disable X11 compositor bypass (#522)
- Continue text injection on failed character (#509)
- Bind Home key to MOVE_HOME instead of HOME screen (#555)
- Do not crash if expanding/collapsing panels is not supported (#506)
- Do not power on the device if --no-control is set
- Improve framerate counting
- Add runtime option to render expired frames (i.e. not skip frames)
- Downgrade SDL to 2.0.8 in Windows releases (#425)
- Upgrade FFmpeg to 4.1.3 in Windows releases
- Upgrade platform-tools to 29.0.1 (adb) in Windows releases
---
## Highlights
Here are some highlights of the changes introduced by scrcpy 1.9.
### Turn device screen off
Many users requested to turn the device screen off while mirroring (#145).
It is now possible at any time, by pressing `Ctrl`+`o`. To turn it back on, just use the `POWER` button (or `Ctrl`+`p`), once to switch off the (mirrored) device, once again to turn both the physical and mirroring on.
To turn the device screen off on start:
scrcpy --turn-screen-off
scrcpy -S
### Copy-paste in both directions
It was already possible to copy-paste from the computer to the Android device (`Ctrl`+`v`), by injecting the text character by character (with all the [limitations of text injection](https://blog.rom1v.com/2018/03/introducing-scrcpy/#handle-text-input)).
Now, it is also possible to copy the Android device clipboard (`Ctrl`+`c`) to paste it on the computer.
In addition, `Ctrl`+`Shift`+`v` allow to copy the computer clipboard to the device, but without pasting it, so that it can then be pasted manually on Android. That way, the clipboard content is not broken by text injection, so it can be used to transmit any text with special characters (an UTF-8 stream).
### Windows PATH simplification
On all platforms except Windows, the absolute path of `scrcpy-server.jar` is hardcoded (typically to `/usr/share/scrcpy/scrcpy-server.jar`), so it is straightforward to know its path.
On Windows however, the server path may not be constant, so the build is "portable": `scrcpy-server.jar` is expected to be in the same directory as `scrcpy.exe`. Concretely, to push the server to the device, _scrcpy_ just executed:
```
adb push scrcpy-server.jar /data/local/tmp/
```
The problem is that `scrcpy-server.jar` is searched in the current directory, which is not necessarily the same as the _scrcpy_ directory. Typically, if you added the _scrcpy_ directory in your `PATH` to call `scrcpy` from anywhere, the current directory could be anything. This was very [annoying and confusing](https://github.com/Genymobile/scrcpy/issues/278#issuecomment-429330345) (you had to set the environment variable `SCRCPY_SERVER_PATH` as a workaround).
Now, on Windows, the server path will be built based on the `scrcpy` executable path, so it works out-of-the-box.
### Mouse focus clickthrough
When _scrcpy_ doesn't have focus, it needed one click to get focus, and another click to actually "click" on the device.
Mouse focus clickthrough was enabled in earlier versions, but a stupid regression broke it in v1.8. It has been fixed.