scrcpy --help says that Control-Up and Control-Down are the commands for activating the volume buttons on the phone. However, these are unusable on Mac by default, because these keyboard shortcuts show you all open windows (control-up), and all the windows for the current application (control-down).
This means that scrcpy doesn't receive these keyboard shortcuts, therefore not simulating the volume button presses on the connected phone.
Mwarf. I changed them from Ctrl++ and Ctrl+- because it did not work everywhere: https://github.com/Genymobile/scrcpy/issues/103.
I chose Ctrl+↑ and Ctrl+↓ because they are the shortcuts for VLC (on Linux at least). What are the VLC shortcut on MacOS?
For VLC on Mac, the keyboard shortcuts for changing the volume are Command-Up and Command-Down.
@numbermaniac Thank you for the info.
If you look at all the shortcuts for _scrcpy_, would you say that _Ctrl_ should always be replaced by _Command_ on MacOS? Or just for the volume?
Other shortcuts works well on my mac except the volume.
And by default:
Command-M: Minimize the front window to the Dock.
Command-H: Hide the windows of the front app.
So Ctrl should be replaced by Command on MacOS just for the volume.
Yes, those two shortcuts are also built-in on Mac so they should be best kept as Control. Other shortcuts, though not conflicting with anything, might be confusing if changed to Command: Command-P usually means Print, Command-S usually means Save, Command-F for Find, and Command-B is sometimes used for Bold text.
As xinx1n said, it would probably be best to just replace Ctrl with Command for the volume buttons.
Could you test the macos_volume branch, and tell me if it works correctly on MacOS, please?
Do I need to go through the full client and server building instructions for this? Is there a pre-built server I can use?
@numbermaniac It should work with the prebuilt server from v1.4: https://github.com/Genymobile/scrcpy/blob/macos_volume/BUILD.md#prebuilt-server
sry,I just get my macbook now.
I built the client and server and tested the shortcuts(only the shortcuts), it's ok.
Merged on master (https://github.com/Genymobile/scrcpy/commit/5bf1261364707e9b27d271d0075cf9601ea2ee29 + https://github.com/Genymobile/scrcpy/commit/d061c309656b477dc9adbaf5813e99861d77520e).
Most helpful comment
sry,I just get my macbook now.
I built the client and server and tested the shortcuts(only the shortcuts), it's ok.