Implement computer-to-device clipboard copy

It was already possible to _paste_ (with Ctrl+v) the content of the
computer clipboard on the device. Technically, it injects a sequence of
events to generate the text.

Add a new feature (Ctrl+Shift+v) to copy to the device clipboard
instead, without injecting the content. Contrary to events injection,
this preserves the UTF-8 content exactly, so the text is not broken by
special characters.

<https://github.com/Genymobile/scrcpy/issues/413>
This commit is contained in:
Romain Vimont
2019-05-30 20:25:23 +02:00
parent 2322069656
commit c13a24389c
12 changed files with 138 additions and 6 deletions

View File

@@ -143,6 +143,9 @@ static void usage(const char *arg0) {
" Ctrl+v\n"
" paste computer clipboard to device\n"
"\n"
" Ctrl+Shift+v\n"
" copy computer clipboard to device\n"
"\n"
" Ctrl+i\n"
" enable/disable FPS counter (print frames/second in logs)\n"
"\n"