diff --git a/README.md b/README.md index 96d3926b1a0db57cfcbee7a7a3bb1cb0b9c95230..c20be5083ff5490bd2d4b92f2ab87271f9fb2c9d 100644 --- a/README.md +++ b/README.md @@ -610,8 +610,8 @@ _[Super] is typically the "Windows" or "Cmd" key._ | Collapse notification panel | `MOD`+`Shift`+`n` | Copy to clipboard³ | `MOD`+`c` | Cut to clipboard³ | `MOD`+`x` - | Paste computer clipboard to device | `MOD`+`v` - | Copy computer clipboard to device and paste | `MOD`+`Shift`+`v` + | Synchronize clipboards and paste³ | `MOD`+`v` + | Inject computer clipboard text | `MOD`+`Shift`+`v` | Enable/disable FPS counter (on stdout) | `MOD`+`i` _¹Double-click on black borders to remove them._ diff --git a/app/scrcpy.1 b/app/scrcpy.1 index 9193171e483e0d2cce73b7da2500fb3748f059c5..728d14fe0b51851ddb72ff0e2cb901d8db6190be 100644 --- a/app/scrcpy.1 +++ b/app/scrcpy.1 @@ -302,11 +302,11 @@ Cut to clipboard (inject CUT keycode, Android >= 7 only) .TP .B MOD+v -Paste computer clipboard to device +Copy computer clipboard to device, then paste (inject PASTE keycode, Android >= 7 only) .TP .B MOD+Shift+v -Copy computer clipboard to device (and paste if the device runs Android >= 7) +Inject computer clipboard text as a sequence of key events .TP .B MOD+i diff --git a/app/src/cli.c b/app/src/cli.c index ff810aedd1a30c862c4c6c91b859259f345ac69d..b75ab41a4483c285fd49dc4575e5d54671372987 100644 --- a/app/src/cli.c +++ b/app/src/cli.c @@ -267,11 +267,11 @@ scrcpy_print_usage(const char *arg0) { " Cut to clipboard (inject CUT keycode, Android >= 7 only)\n" "\n" " MOD+v\n" - " Paste computer clipboard to device\n" + " Copy computer clipboard to device, then paste (inject PASTE\n" + " keycode, Android >= 7 only)\n" "\n" " MOD+Shift+v\n" - " Copy computer clipboard to device (and paste if the device\n" - " runs Android >= 7)\n" + " Inject computer clipboard text as a sequence of key events\n" "\n" " MOD+i\n" " Enable/disable FPS counter (print frames/second in logs)\n" diff --git a/app/src/input_manager.c b/app/src/input_manager.c index 75808f7562825f30599784506243b62c2ba5fe70..ec1d5a4efcf45d9a5be16e058e4e33c747be6195 100644 --- a/app/src/input_manager.c +++ b/app/src/input_manager.c @@ -405,11 +405,11 @@ input_manager_process_key(struct input_manager *im, case SDLK_v: if (control && !repeat && down) { if (shift) { - // store the text in the device clipboard and paste - set_device_clipboard(controller, true); - } else { // inject the text as input events clipboard_paste(controller); + } else { + // store the text in the device clipboard and paste + set_device_clipboard(controller, true); } } return;