Change "resize to fit" shortcut to MOD+w

For convenience, MOD+x will be used for injecting the CUT keycode.
This commit is contained in:
Romain Vimont 2020-07-17 00:00:42 +02:00
parent bccd12bf5c
commit 8f64a5984b
4 changed files with 4 additions and 4 deletions

View file

@ -594,7 +594,7 @@ _[Super] is typically the "Windows" or "Cmd" key._
| Rotate display left | `MOD`+`←` _(left)_ | Rotate display left | `MOD`+`←` _(left)_
| Rotate display right | `MOD`+`→` _(right)_ | Rotate display right | `MOD`+`→` _(right)_
| Resize window to 1:1 (pixel-perfect) | `MOD`+`g` | Resize window to 1:1 (pixel-perfect) | `MOD`+`g`
| Resize window to remove black borders | `MOD`+`x` \| _Double-click¹_ | Resize window to remove black borders | `MOD`+`w` \| _Double-click¹_
| Click on `HOME` | `MOD`+`h` \| _Middle-click_ | Click on `HOME` | `MOD`+`h` \| _Middle-click_
| Click on `BACK` | `MOD`+`b` \| _Right-click²_ | Click on `BACK` | `MOD`+`b` \| _Right-click²_
| Click on `APP_SWITCH` | `MOD`+`s` | Click on `APP_SWITCH` | `MOD`+`s`

View file

@ -237,7 +237,7 @@ Rotate display right
Resize window to 1:1 (pixel\-perfect) Resize window to 1:1 (pixel\-perfect)
.TP .TP
.B MOD+x, Double\-click on black borders .B MOD+w, Double\-click on black borders
Resize window to remove black borders Resize window to remove black borders
.TP .TP

View file

@ -214,7 +214,7 @@ scrcpy_print_usage(const char *arg0) {
" MOD+g\n" " MOD+g\n"
" Resize window to 1:1 (pixel-perfect)\n" " Resize window to 1:1 (pixel-perfect)\n"
"\n" "\n"
" MOD+x\n" " MOD+w\n"
" Double-click on black borders\n" " Double-click on black borders\n"
" Resize window to remove black borders\n" " Resize window to remove black borders\n"
"\n" "\n"

View file

@ -398,7 +398,7 @@ input_manager_process_key(struct input_manager *im,
screen_switch_fullscreen(im->screen); screen_switch_fullscreen(im->screen);
} }
return; return;
case SDLK_x: case SDLK_w:
if (!shift && !repeat && down) { if (!shift && !repeat && down) {
screen_resize_to_fit(im->screen); screen_resize_to_fit(im->screen);
} }