Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shortcut vol + and - do not work #103

Closed
redgitid opened this issue Mar 29, 2018 · 10 comments
Closed

Shortcut vol + and - do not work #103

redgitid opened this issue Mar 29, 2018 · 10 comments
Assignees

Comments

@redgitid
Copy link

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

@rom1v
Copy link
Collaborator

rom1v commented Mar 29, 2018

Thank you for your report.

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

@rom1v
Copy link
Collaborator

rom1v commented Mar 29, 2018

What if you manually execute:

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

?

@redgitid
Copy link
Author

redgitid commented Mar 29, 2018

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

@redgitid
Copy link
Author

redgitid commented Mar 29, 2018

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

@rom1v
Copy link
Collaborator

rom1v commented Mar 29, 2018

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 #103 (comment).

@redgitid
Copy link
Author

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

@wieuwzak
Copy link

wieuwzak commented Apr 1, 2018

  • 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.

rom1v added a commit that referenced this issue Apr 3, 2018
I could not make Ctrl+'+' and Ctrl+'-' work for every keyboard on every
platform.

Instead, use Ctrl+UP and Ctrl+DOWN (like in VLC) to change the volume.

Fixes <#103>.
@rom1v
Copy link
Collaborator

rom1v commented Apr 3, 2018

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 rom1v closed this as completed Apr 3, 2018
@rom1v rom1v added the bug label Apr 3, 2018
@rom1v rom1v self-assigned this Apr 3, 2018
@redgitid
Copy link
Author

redgitid commented Apr 3, 2018

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

@Piyushshuklahelper
Copy link

Just open Command prompt and type cd and copy the location of scrcpy folder where you located then type adb shell input keyevent 24 and adb shell input keyevent 25 for check Ctrl ^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants