v2.5

Genymobile/scrcpyv2.5Jun 29, 2024by rom1v

AI Summary

Adds a control-only mode that allows users to control the device without mirroring video, along with mouse hover forwarding and a new mouse binding configuration system.

Key Highlights

  • Control-only mode (no video/audio) with UHID mouse support.
  • Pause and unpause display shortcuts (MOD+z).
  • Forward mouse hover events to trigger animations.
  • New --mouse-bind option to configure secondary click behavior.
  • Fixes rotation shortcut for Android 14.

Breaking Changes

  • Default mouse behavior changed: secondary clicks now trigger shortcuts by default.
  • --forward-all-clicks option replaced by --mouse-bind.

New Features

  • Control-only mode.
  • Pause/unpause display.
  • Mouse hover forwarding.
  • --mouse-bind option.

Full Release Notes

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

---

**scrcpy v2.5**

Changes since v2.4:
 - Add scrcpy window without video playback (#4727, #4793, #4868)
 - Add a shortcut to pause/unpause display (#1632, #4748)
 - Forward mouse hover events (#2743, #3070, #5039)
 - Add option to configure mouse bindings (#5022)
 - Forward all clicks by default for UHID/AOA (#5022)
 - Simplify shortcut modifiers (#4741)
 - Fix rotation shortcut for Android 14 (#4740, #4841)
 - Fix YUV conversion for full color range (#4756)
 - Fix camera sizes listing on some devices (#4852)
 - Fix thread leak on Windows (#4973)
 - Upgrade FFmpeg to 7.0.1 in Windows releases
 - Upgrade SDL to 2.30.4 in Windows releases
 - Upgrade platform-tools (adb) to 35.0.0 in Windows releases
 - Various technical fixes

---

# Highlights

## Control-only

By default, scrcpy now always opens a window (unless `--no-window` is passed), even without video stream (#4868).

In particular, this gives the possibility to solely control the device without screen mirroring:

```
scrcpy --no-video --no-audio
```

![window](https://github.com/Genymobile/scrcpy/assets/543275/fe0dfa5c-5927-403b-b71d-b8ff258327c3)

In that case, [UHID] mouse mode is used by default. It works both over USB and wirelessly.

This is different from [OTG mode], which does not require USB debugging at all. Here, the standard mode is used but with the possibility to disable video playback.

[OTG mode]: https://github.com/Genymobile/scrcpy/blob/master/doc/otg.md
[UHID]: https://github.com/Genymobile/scrcpy/blob/master/doc/mouse.md#uhid


## Pause/unpause display

New shortcuts allow to pause (<kbd>MOD</kbd>+<kbd>z</kbd>) and unpause <kbd>MOD</kbd>+<kbd>Shift</kbd>+<kbd>z</kbd> the display (#4748).

It only impacts rendering, the device is still captured, the video stream transmitted to the device, and recorded if recording is enabled.

This can be useful for example during a presentation, to temporarily move to a different app on the device without showing the content.


## Mouse hover

Initially, mouse motion (hover) events were not forwarded to the device when no mouse button was pressed. The reason was that at the time (6 years ago), these events had absolutely no impact on the devices I tested.

But on newer Android versions and newer apps, mouse hover events trigger animations and highlight items. So this new release forwards hover events, with a new option `--no-mouse-hover` to disable them.


## Mouse bindings

By default, mouse secondary clicks triggers [shortcuts]:
 - right click: BACK
 - middle click: HOME
 - 4th click: APP_SWITCH
 - 5th click: expand notification panel

An option `--forward-all-clicks` had been added some time ago to forward all clicks to the device instead.

This release replaces `--forward-all-clicks` by a more flexible option `--mouse-bind=xxxx`. The argument must be exactly 4 characters, one for each secondary click:

    --mouse-bind=xxxx
                 ^^^^
                 ||||
                 ||| `- 5th click
                 || `-- 4th click
                 | `--- middle click
                  `---- right click

Each character must be one of the following:

 - `+`: forward the click to the device
 - `-`: ignore the click
 - `b`: trigger shortcut BACK (or turn screen on if off)
 - `h`: trigger shortcut HOME
 - `s`: trigger shortcut APP_SWITCH
 - `n`: trigger shortcut "expand notification panel"

For example:

```bash
scrcpy --mouse-bind=bhsn  # the default mode
scrcpy --mouse-bind=++++  # forward all clicks (default for AOA/UHID)
scrcpy --mouse-bind=++bh  # forward right and middle clicks,
                          # use 4th and 5th for BACK and HOME
```

With [UHID and AOA] mouse modes (when the mouse cursor appears on the device), all clicks are now forwarded by default (but the behavior can be changed using `--mouse-bind`).


[shortcuts]: https://github.com/Genymobile/scrcpy/blob/master/doc/shortcuts.md
[UHID and AOA]: https://github.com/Genymobile/scrcpy/blob/master/doc/mouse.md#physical-mouse-simulation

---

 - Twitter: [`@scrcpy_app`](https://twitter.com/scrcpy_app)
 - Reddit: [`r/scrcpy`](https://www.reddit.com/r/scrcpy)