diff --git a/app/scrcpy.1 b/app/scrcpy.1 index a3437019..a484de84 100644 --- a/app/scrcpy.1 +++ b/app/scrcpy.1 @@ -696,7 +696,7 @@ In the following list, MOD is the shortcut modifier. By default, it's (left) Alt or (left) Super, but it can be configured by \fB\-\-shortcut\-mod\fR (see above). .TP -.B MOD+f +.B MOD+f, F11 Switch fullscreen mode .TP diff --git a/app/src/cli.c b/app/src/cli.c index 46a69231..2f39ecd9 100644 --- a/app/src/cli.c +++ b/app/src/cli.c @@ -1004,7 +1004,7 @@ static const struct sc_option options[] = { static const struct sc_shortcut shortcuts[] = { { - .shortcuts = { "MOD+f" }, + .shortcuts = { "MOD+f", "F11" }, .text = "Switch fullscreen mode", }, { diff --git a/app/src/input_manager.c b/app/src/input_manager.c index 3ed26f11..b55ad591 100644 --- a/app/src/input_manager.c +++ b/app/src/input_manager.c @@ -447,6 +447,19 @@ sc_input_manager_process_key(struct sc_input_manager *im, } } + // Shortcuts that do not involve the MOD key + switch (sdl_keycode) { + case SDLK_F11: + if (video && !repeat && down) { + bool alt = event->mod & SDL_KMOD_ALT; + bool super = event->mod & SDL_KMOD_GUI; + if (!ctrl && !shift && !alt && !super) { + sc_screen_toggle_fullscreen(im->screen); + } + } + return; + } + if (is_shortcut) { enum sc_action action = down ? SC_ACTION_DOWN : SC_ACTION_UP; switch (sdl_keycode) { diff --git a/doc/shortcuts.md b/doc/shortcuts.md index 3a439d17..9fe1c0d2 100644 --- a/doc/shortcuts.md +++ b/doc/shortcuts.md @@ -23,7 +23,7 @@ _[Super] is typically the Windows or Cmd key._ | Action | Shortcut | ------------------------------------------- |:----------------------------- - | Switch fullscreen mode | MOD+f + | Switch fullscreen mode | MOD+f \| F11 | Rotate display left | MOD+ _(left)_ | Rotate display right | MOD+ _(right)_ | Flip display horizontally | MOD+Shift+ _(left)_ \| MOD+Shift+ _(right)_ diff --git a/doc/window.md b/doc/window.md index 2bc13b47..8e201064 100644 --- a/doc/window.md +++ b/doc/window.md @@ -58,7 +58,7 @@ scrcpy -f # short version ``` Fullscreen mode can then be toggled dynamically with MOD+f -(see [shortcuts](shortcuts.md)). +or F11 (see [shortcuts](shortcuts.md)). ## Disable screensaver