Skip to content

Commit

Permalink
Accept Super as shortcut modifier
Browse files Browse the repository at this point in the history
In addition to (left) Alt, also accept (left) Super. This is especially
convenient for macOS users (Super is the Cmd key).
  • Loading branch information
rom1v committed Aug 1, 2020
1 parent 769eba7 commit 6f4c42d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ Also see [issue #14].
## Shortcuts

In the following list, `MOD` is the shortcut modifier. By default, it's (left)
`Alt`.
`Alt` or (left) `Super`.

It can be changed using `--shortcut-mod`. Possible keys are `lctrl`, `rctrl`,
`lalt`, `ralt`, `lsuper` and `rsuper`. For example:
Expand Down
4 changes: 2 additions & 2 deletions app/scrcpy.1
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ A shortcut can consist in several keys, separated by '+'. Several shortcuts can

For example, to use either LCtrl+LAlt or LSuper for scrcpy shortcuts, pass "lctrl+lalt,lsuper".

Default is "lalt" (left-Alt).
Default is "lalt,lsuper" (left-Alt or left-Super).

.TP
.B \-S, \-\-turn\-screen\-off
Expand Down Expand Up @@ -218,7 +218,7 @@ Default is 0 (automatic).\n
.SH SHORTCUTS

In the following list, MOD is the shortcut modifier. By default, it's (left)
Alt, but it can be configured by \-\-shortcut-mod.
Alt or (left) Super, but it can be configured by \-\-shortcut-mod.

.TP
.B MOD+f
Expand Down
5 changes: 3 additions & 2 deletions app/src/cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ scrcpy_print_usage(const char *arg0) {
" For example, to use either LCtrl+LAlt or LSuper for scrcpy\n"
" shortcuts, pass \"lctrl+lalt,lsuper\".\n"
"\n"
" Default is \"lalt\" (left-Alt).\n"
" Default is \"lalt,lsuper\" (left-Alt or left-Super).\n"
"\n"
" -S, --turn-screen-off\n"
" Turn the device screen off immediately.\n"
Expand Down Expand Up @@ -199,7 +199,8 @@ scrcpy_print_usage(const char *arg0) {
"Shortcuts:\n"
"\n"
" In the following list, MOD is the shortcut modifier. By default,\n"
" it's (left) Alt, but it can be configured by --shortcut-mod.\n"
" it's (left) Alt or (left) Super, but it can be configured by\n"
" --shortcut-mod.\n"
"\n"
" MOD+f\n"
" Switch fullscreen mode\n"
Expand Down
4 changes: 2 additions & 2 deletions app/src/scrcpy.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ struct scrcpy_options {
.last = DEFAULT_LOCAL_PORT_RANGE_LAST, \
}, \
.shortcut_mods = { \
.data = {SC_MOD_LALT}, \
.count = 1, \
.data = {SC_MOD_LALT, SC_MOD_LSUPER}, \
.count = 2, \
}, \
.max_size = DEFAULT_MAX_SIZE, \
.bit_rate = DEFAULT_BIT_RATE, \
Expand Down

0 comments on commit 6f4c42d

Please sign in to comment.