Skip to content

Commit

Permalink
MOD+z (to fixup)
Browse files Browse the repository at this point in the history
  • Loading branch information
rom1v committed Mar 10, 2024
1 parent f94e932 commit 8779599
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/scrcpy.1
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ Flip display horizontally
Flip display vertically

.TP
.B MOD+Shift+p
.B MOD+z
Pause/unpause display

.TP
Expand Down
2 changes: 1 addition & 1 deletion app/src/cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -901,7 +901,7 @@ static const struct sc_shortcut shortcuts[] = {
.text = "Flip display vertically",
},
{
.shortcuts = { "MOD+Shift+p" },
.shortcuts = { "MOD+z" },
.text = "Pause/unpause display",
},
{
Expand Down
7 changes: 5 additions & 2 deletions app/src/input_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -451,8 +451,6 @@ sc_input_manager_process_key(struct sc_input_manager *im,
case SDLK_p:
if (im->kp && !shift && !repeat && !paused) {
action_power(im, action);
} else if (shift && down && !repeat) {
sc_screen_switch_pause(im->screen);
}
return;
case SDLK_o:
Expand All @@ -463,6 +461,11 @@ sc_input_manager_process_key(struct sc_input_manager *im,
set_screen_power_mode(im, mode);
}
return;
case SDLK_z:
if (!shift && down && !repeat) {
sc_screen_switch_pause(im->screen);
}
return;
case SDLK_DOWN:
if (shift) {
if (!repeat & down) {
Expand Down
2 changes: 1 addition & 1 deletion doc/shortcuts.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ _<kbd>[Super]</kbd> is typically the <kbd>Windows</kbd> or <kbd>Cmd</kbd> key._
| 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)_
| Flip display vertically | <kbd>MOD</kbd>+<kbd>Shift</kbd>+<kbd>↑</kbd> _(up)_ \| <kbd>MOD</kbd>+<kbd>Shift</kbd>+<kbd>↓</kbd> _(down)_
| Pause/unpause display | <kbd>MOD</kbd>+<kbd>Shift</kbd>+<kbd>p</kbd>
| Pause/unpause display | <kbd>MOD</kbd>+<kbd>z</kbd>
| Resize window to 1:1 (pixel-perfect) | <kbd>MOD</kbd>+<kbd>g</kbd>
| Resize window to remove black borders | <kbd>MOD</kbd>+<kbd>w</kbd> \| _Double-left-click¹_
| Click on `HOME` | <kbd>MOD</kbd>+<kbd>h</kbd> \| _Middle-click_
Expand Down

0 comments on commit 8779599

Please sign in to comment.