Replace Ctrl by Meta for volume shortcuts on MacOS

Ctrl+UP and Ctrl+DOWN are already used by the window manager on MacOS.

Use Cmd key instead (like on VLC).
pull/331/head
Romain Vimont 6 years ago
parent 5bf1261364
commit d061c30965

@ -134,8 +134,8 @@ scrcpy -f
| click on `BACK` | `Ctrl`+`b` \| _Right-click²_ |
| click on `APP_SWITCH` | `Ctrl`+`s` |
| click on `MENU` | `Ctrl`+`m` |
| click on `VOLUME_UP` | `Ctrl`+`↑` _(up)_ |
| click on `VOLUME_DOWN` | `Ctrl`+`↓` _(down)_ |
| click on `VOLUME_UP` | `Ctrl`+`↑` _(up)_ (`Cmd`+`↑` on MacOS) |
| click on `VOLUME_DOWN` | `Ctrl`+`↓` _(down)_ (`Cmd`+`↓` on MacOS) |
| click on `POWER` | `Ctrl`+`p` |
| turn screen on | _Right-click²_ |
| paste computer clipboard to device | `Ctrl`+`v` |

@ -200,13 +200,21 @@ void input_manager_process_key(struct input_manager *input_manager,
}
return;
case SDLK_DOWN:
#ifdef __APPLE__
if (!ctrl && meta) {
#else
if (ctrl && !meta) {
#endif
// forward repeated events
action_volume_down(input_manager->controller, action);
}
return;
case SDLK_UP:
#ifdef __APPLE__
if (!ctrl && meta) {
#else
if (ctrl && !meta) {
#endif
// forward repeated events
action_volume_up(input_manager->controller, action);
}

Loading…
Cancel
Save