Implement device-to-computer clipboard copy

On Ctrl+C:
 - the client sends a GET_CLIPBOARD command to the device;
 - the device retrieve its current clipboard text and sends it in a
   GET_CLIPBOARD device event;
 - the client sets this text as the system clipboard text, so that it
   can be pasted in another application.

Fixes <https://github.com/Genymobile/scrcpy/issues/145>
This commit is contained in:
Romain Vimont
2019-05-30 15:23:01 +02:00
parent 3149e2cf4a
commit 63c078ee6c
13 changed files with 109 additions and 0 deletions

View File

@@ -137,6 +137,9 @@ static void usage(const char *arg0) {
" Ctrl+Shift+n\n"
" collapse notification panel\n"
"\n"
" Ctrl+c\n"
" copy device clipboard to computer\n"
"\n"
" Ctrl+v\n"
" paste computer clipboard to device\n"
"\n"