mirror of
https://github.com/Genymobile/scrcpy.git
synced 2026-04-21 01:33:36 +00:00
Add F11 as fullscreen shortcut
PR #6777 <https://github.com/Genymobile/scrcpy/pull/6777>
This commit is contained in:
parent
3f7ecafc53
commit
175134c0ca
5 changed files with 17 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ _<kbd>[Super]</kbd> is typically the <kbd>Windows</kbd> or <kbd>Cmd</kbd> key._
|
|||
|
||||
| Action | Shortcut
|
||||
| ------------------------------------------- |:-----------------------------
|
||||
| Switch fullscreen mode | <kbd>MOD</kbd>+<kbd>f</kbd>
|
||||
| Switch fullscreen mode | <kbd>MOD</kbd>+<kbd>f</kbd> \| <kbd>F11</kbd>
|
||||
| Rotate display left | <kbd>MOD</kbd>+<kbd>←</kbd> _(left)_
|
||||
| Rotate display right | <kbd>MOD</kbd>+<kbd>→</kbd> _(right)_
|
||||
| Flip display horizontally | <kbd>MOD</kbd>+<kbd>Shift</kbd>+<kbd>←</kbd> _(left)_ \| <kbd>MOD</kbd>+<kbd>Shift</kbd>+<kbd>→</kbd> _(right)_
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ scrcpy -f # short version
|
|||
```
|
||||
|
||||
Fullscreen mode can then be toggled dynamically with <kbd>MOD</kbd>+<kbd>f</kbd>
|
||||
(see [shortcuts](shortcuts.md)).
|
||||
or <kbd>F11</kbd> (see [shortcuts](shortcuts.md)).
|
||||
|
||||
|
||||
## Disable screensaver
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue