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).
This commit is contained in:
parent
5bf1261364
commit
d061c30965
2 changed files with 10 additions and 2 deletions
|
@ -134,8 +134,8 @@ scrcpy -f
|
||||||
| click on `BACK` | `Ctrl`+`b` \| _Right-click²_ |
|
| click on `BACK` | `Ctrl`+`b` \| _Right-click²_ |
|
||||||
| click on `APP_SWITCH` | `Ctrl`+`s` |
|
| click on `APP_SWITCH` | `Ctrl`+`s` |
|
||||||
| click on `MENU` | `Ctrl`+`m` |
|
| click on `MENU` | `Ctrl`+`m` |
|
||||||
| click on `VOLUME_UP` | `Ctrl`+`↑` _(up)_ |
|
| click on `VOLUME_UP` | `Ctrl`+`↑` _(up)_ (`Cmd`+`↑` on MacOS) |
|
||||||
| click on `VOLUME_DOWN` | `Ctrl`+`↓` _(down)_ |
|
| click on `VOLUME_DOWN` | `Ctrl`+`↓` _(down)_ (`Cmd`+`↓` on MacOS) |
|
||||||
| click on `POWER` | `Ctrl`+`p` |
|
| click on `POWER` | `Ctrl`+`p` |
|
||||||
| turn screen on | _Right-click²_ |
|
| turn screen on | _Right-click²_ |
|
||||||
| paste computer clipboard to device | `Ctrl`+`v` |
|
| paste computer clipboard to device | `Ctrl`+`v` |
|
||||||
|
|
|
@ -200,13 +200,21 @@ void input_manager_process_key(struct input_manager *input_manager,
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
case SDLK_DOWN:
|
case SDLK_DOWN:
|
||||||
|
#ifdef __APPLE__
|
||||||
|
if (!ctrl && meta) {
|
||||||
|
#else
|
||||||
if (ctrl && !meta) {
|
if (ctrl && !meta) {
|
||||||
|
#endif
|
||||||
// forward repeated events
|
// forward repeated events
|
||||||
action_volume_down(input_manager->controller, action);
|
action_volume_down(input_manager->controller, action);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
case SDLK_UP:
|
case SDLK_UP:
|
||||||
|
#ifdef __APPLE__
|
||||||
|
if (!ctrl && meta) {
|
||||||
|
#else
|
||||||
if (ctrl && !meta) {
|
if (ctrl && !meta) {
|
||||||
|
#endif
|
||||||
// forward repeated events
|
// forward repeated events
|
||||||
action_volume_up(input_manager->controller, action);
|
action_volume_up(input_manager->controller, action);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue