v2.4
Genymobile/scrcpyv2.4Mar 2, 2024by rom1v
AI Summary
Adds UHID keyboard and mouse support, enabling physical keyboard and mouse simulation that works wirelessly and on Windows. Also introduces tilt simulation for multitouch.
Key Highlights
- UHID keyboard support (physical keyboard simulation, works wirelessly).
- UHID mouse support (cursor moves to device).
- Simulate tilt multitouch via Shift+click-and-move.
- Adaptation to display API changes in Android 15.
New Features
- UHID keyboard.
- UHID mouse.
- Tilt simulation.
Full Release Notes
_To receive a notification on new releases, click on **Watch > Custom > Releases** at the top._ --- **scrcpy v2.4** Changes since v2.3.1: - Add UHID keyboard and mouse support (#4473) - Simulate tilt multitouch by pressing Shift (#4529) - Add rotation support for non-default display (#4698) - Improve audio player (#4572) - Adapt to display API changes in Android 15 (#4646, #4656, #4657) - Adapt audio workarounds to Android 14 (#4492) - Fix clipboard for IQOO devices on Android 14 (#4492, #4589, #4703) - Fix integer overflow for audio packet duration (#4536) - Rework cleanup (#4649) - Upgrade FFmpeg to 6.1.1 in Windows releases (#4713) - Upgrade libusb to 1.0.27 in Windows releases (#4713) - Various technical fixes --- # Highlights ## UHID keyboard This is a huge improvement for typing text, especially in non-English languages: ```bash scrcpy --keyboard=uhid scrcpy -K # short version ``` It simulates a [physical keyboard](https://github.com/Genymobile/scrcpy/blob/master/doc/keyboard.md#physical-keyboard-simulation). Contrary to the default text injection method, it is not limited to ASCII and some other characters. This is functionally equivalent to the existing AOA mode (`--keyboard=aoa`), except it is not limited to USB (it also works wirelessly) and it works on Windows while mirroring (and without driver issues). The keyboard layout must be configured (once and for all) on the device to match that of the computer (that's the reason why it's not the default). To open the keyboard settings, several possibilities: - from the scrcpy window (when uhid or aoa is used), by pressing <kbd>MOD</kbd>+<kbd>k</kbd> (see [shortcuts](https://github.com/Genymobile/scrcpy/blob/tmp/doc/shortcuts.md)) - from the device, in Settings → System → Languages and input → Physical devices - from a terminal on the computer, by executing `adb shell am start -a android.settings.HARD_KEYBOARD_SETTINGS` From there, it is also possible to enable or disable the virtual keyboard. See #4473. ## UHID mouse Similarly, it is possible to simulate a [physical mouse](https://github.com/Genymobile/scrcpy/blob/master/doc/mouse.md#physical-mouse-simulation): ```bash scrcpy --mouse=uhid scrcpy -M # short version ``` Like in AOA mode (`--mouse=aoa`), the computer mouse is "captured": the mouse pointer disappears from the computer and appears on the Android device instead. Special capture keys, either <kbd>Alt</kbd> or <kbd>Super</kbd>, toggle (disable or enable) the mouse capture. Use one of them to give the control of the mouse back to the computer. See #4473. ## Simulate tilt It was already possible to simulate two symmetric fingers to pinch-to-zoom or rotate by using <kbd>Ctrl</kbd>+_click-and-move_: https://github.com/Genymobile/scrcpy/assets/543275/26c4a920-9805-43f1-8d4c-608752d04767 This new version introduces a variant to tilt by using <kbd>Shift</kbd>+_click-and-move-up-or-down_: https://github.com/Genymobile/scrcpy/assets/543275/1e252341-4a90-4b29-9d11-9153b324669f Technically, scrcpy generates additional touch events from a "virtual finger" at a location inverted through the center of the screen. When pressing <kbd>Ctrl</kbd> the _x_ and _y_ coordinates are inverted. Using <kbd>Shift</kbd> only inverts _x_. See #4529 and [documentation](https://github.com/Genymobile/scrcpy/blob/dev/doc/control.md#pinch-to-zoom-rotate-and-tilt-simulation). ## Android 15 A lot of refactors related to display occurred in Android, which required changes to continue working with the latest Android beta versions. See #4657. --- - Twitter: [`@scrcpy_app`](https://twitter.com/scrcpy_app) - Reddit: [`r/scrcpy`](https://www.reddit.com/r/scrcpy)