Scrcpy: Shortcut vol + and - do not work

Created on 29 Mar 2018  Â·  9Comments  Â·  Source: Genymobile/scrcpy

Hi, Shortcuts to increase or decrease the phone volume do not work

bug input events

Most helpful comment

OK, thank you, I reproduced on Windows.

I could not make Ctrl++ and Ctrl+- work for every keyboard on every platform with SDL2. It seems I am not alone: https://stackoverflow.com/questions/41570751/how-to-correctly-handle-control-key-combinations-in-sdl2

So I changed the shortcuts to Ctrl+↑ and Ctrl+↓ (on dev branch for now).

All 9 comments

Thank you for your report.

On what system (Linux, Windows, MacOS)? On what device, with which keyboard layout?

What if you manually execute:

adb shell input keyevent 24 # volume up
adb shell input keyevent 25 # volume down

?

@rom1v Thanks to you for the answer and if you settle! Windows 7, Huawei P9 lite, QWERTY italian layout

@rom1v no I use the keyboard shortcut but Do not work

To determine the cause of the issue with the keyboard shortcuts, please try sending the volume key events manually.

Open a console, go to the adb directory, and execute the commands provided in https://github.com/Genymobile/scrcpy/issues/103#comment-377288577.

I do not know how to use the console, what should I do exactly? :c

  • hold shift + right shift on the folder that scrcpy is in.
  • click "open command shell here" (something like this, I have different language)
  • plug in your phone and execute command: "adb devices" to see if it's connected
  • execute the command "adb shell input keyevent 24"
  • see if your phone responds to the command, it should be turning the volume up.
  • if it doesn't respond to the command, paste the output of the command shell here.

Update: tested on my nexus 5x running nougat. adb commands turn volume up or down. However inside scrscpy the keyboard {ctrl -} or { ctrl +} doesn't change volume.

OK, thank you, I reproduced on Windows.

I could not make Ctrl++ and Ctrl+- work for every keyboard on every platform with SDL2. It seems I am not alone: https://stackoverflow.com/questions/41570751/how-to-correctly-handle-control-key-combinations-in-sdl2

So I changed the shortcuts to Ctrl+↑ and Ctrl+↓ (on dev branch for now).

@rom1v thanks, You are very kind, I hope it will work in the next version :3

Was this page helpful?
0 / 5 - 0 ratings

Related issues

udit7395 picture udit7395  Â·  4Comments

fleytman picture fleytman  Â·  4Comments

behzadpooldar picture behzadpooldar  Â·  4Comments

npes87184 picture npes87184  Â·  3Comments

qymspace picture qymspace  Â·  3Comments