Add option to force legacy method for pasting

Some devices do not behave as expected when setting the device clipboard
programmatically.

Add an option --legacy-paste to change the behavior of Ctrl+v and MOD+v
so that they inject the computer clipboard text as a sequence of key
events (the same way as MOD+Shift+v).

Fixes #1750 <https://github.com/Genymobile/scrcpy/issues/1750>
Fixes #1771 <https://github.com/Genymobile/scrcpy/issues/1771>
This commit is contained in:
Romain Vimont
2020-10-06 21:30:10 +02:00
parent adc547fa6e
commit d5f059c7cb
6 changed files with 32 additions and 1 deletions

View File

@@ -80,6 +80,7 @@ struct scrcpy_options {
bool disable_screensaver;
bool forward_key_repeat;
bool forward_all_clicks;
bool legacy_paste;
};
#define SCRCPY_OPTIONS_DEFAULT { \
@@ -125,6 +126,7 @@ struct scrcpy_options {
.disable_screensaver = false, \
.forward_key_repeat = true, \
.forward_all_clicks = false, \
.legacy_paste = false, \
}
bool