Skip to content

Commit

Permalink
Swap paste shortcuts
Browse files Browse the repository at this point in the history
For consistency with MOD+c and MOD+x, use MOD+v to inject PASTE.

Use Mod+Shift+v to inject clipboard content as a sequence of text
events.
  • Loading branch information
rom1v committed Jul 16, 2020
1 parent d5e8bcb commit f2e8728
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -595,8 +595,8 @@ In the following list, `MOD` is the shortcut modifier. By default, it's (left)
| 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._
Expand Down
4 changes: 2 additions & 2 deletions app/scrcpy.1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions app/src/cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions app/src/input_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -401,11 +401,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;
Expand Down

0 comments on commit f2e8728

Please sign in to comment.