Add Meta+x shortcut for CUT
Add a scrcpy shortcut to send the CUT keycode.
This commit is contained in:
parent
567c5a7da7
commit
a98b74df3d
@ -583,6 +583,7 @@ _`Meta` is typically the `Windows` key on the keyboard, or `Cmd` on macOS._
|
||||
| Expand notification panel | `Meta`+`n`
|
||||
| Collapse notification panel | `Meta`+`Shift`+`n`
|
||||
| Press COPY³, then Copy device clipboard to computer | `Meta`+`c`
|
||||
| Press CUT³ | `Meta`+`x`
|
||||
| Paste computer clipboard to device | `Meta`+`v`
|
||||
| Copy computer clipboard to device, then press PASTE³ | `Meta`+`Shift`+`v`
|
||||
| Enable/disable FPS counter (on stdout) | `Meta`+`i`
|
||||
|
@ -279,6 +279,10 @@ Collapse notification panel
|
||||
.B Meta+c
|
||||
Press COPY (Android >= 7), then copy device clipboard to computer
|
||||
|
||||
.TP
|
||||
.B Meta+x
|
||||
Press CUT (Android >= 7)
|
||||
|
||||
.TP
|
||||
.B Meta+v
|
||||
Paste computer clipboard to device
|
||||
|
@ -248,6 +248,9 @@ scrcpy_print_usage(const char *arg0) {
|
||||
" Press COPY (Android >= 7), then copy device clipboard to\n"
|
||||
" computer\n"
|
||||
"\n"
|
||||
" " MOD "+x\n"
|
||||
" Press CUT (Android >= 7)\n"
|
||||
"\n"
|
||||
" " MOD "+v\n"
|
||||
" Paste computer clipboard to device\n"
|
||||
"\n"
|
||||
|
@ -70,6 +70,11 @@ action_menu(struct controller *controller, int actions) {
|
||||
send_keycode(controller, AKEYCODE_MENU, actions, "MENU");
|
||||
}
|
||||
|
||||
static inline void
|
||||
action_cut(struct controller *controller, int actions) {
|
||||
send_keycode(controller, AKEYCODE_CUT, actions, "CUT");
|
||||
}
|
||||
|
||||
// turn the screen on if it was off, press BACK otherwise
|
||||
static void
|
||||
press_back_or_turn_screen_on(struct controller *controller) {
|
||||
@ -346,6 +351,14 @@ input_manager_process_key(struct input_manager *im,
|
||||
request_device_clipboard(controller, true);
|
||||
}
|
||||
return;
|
||||
case SDLK_x:
|
||||
if (control && !shift && !repeat && down) {
|
||||
// For convenience (especially on macOS), bind Meta+x to
|
||||
// CUT (even if it is already accessible by pressing Ctrl+x
|
||||
// on the device)
|
||||
action_cut(controller, action);
|
||||
}
|
||||
return;
|
||||
case SDLK_v:
|
||||
if (control && !repeat && down) {
|
||||
if (shift) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user