mirror of
https://github.com/Genymobile/scrcpy
synced 2025-09-01 06:45:40 +00:00
Explicitly indicate when device clipboard is set
Pass the information that device clipboard has been set to the key processor. This avoids the keyprocessor to "guess", and paves the way to implement a proper acknowledgement mechanism. PR #2814 <https://github.com/Genymobile/scrcpy/pull/2814>
This commit is contained in:
@@ -510,7 +510,8 @@ input_manager_process_key(struct input_manager *im,
|
||||
return;
|
||||
}
|
||||
|
||||
if (ctrl && !shift && keycode == SDLK_v && down && !repeat) {
|
||||
bool is_ctrl_v = ctrl && !shift && keycode == SDLK_v && down && !repeat;
|
||||
if (is_ctrl_v) {
|
||||
if (im->legacy_paste) {
|
||||
// inject the text as input events
|
||||
clipboard_paste(controller);
|
||||
@@ -525,7 +526,7 @@ input_manager_process_key(struct input_manager *im,
|
||||
}
|
||||
}
|
||||
|
||||
im->kp->ops->process_key(im->kp, event);
|
||||
im->kp->ops->process_key(im->kp, event, is_ctrl_v);
|
||||
}
|
||||
|
||||
static void
|
||||
|
Reference in New Issue
Block a user