Skip to content

Commit

Permalink
Increase delay to inject HID on Ctrl+v
Browse files Browse the repository at this point in the history
2 milliseconds turn out to be insufficient sometimes. It seems that 5
milliseconds is enough (and still not noticeable).
  • Loading branch information
rom1v committed Nov 14, 2021
1 parent c1a3488 commit 45b0f81
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/src/hid_keyboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ sc_key_processor_process_key(struct sc_key_processor *kp,
// requested. Wait a bit so that the clipboard is set before
// injecting Ctrl+v via HID, otherwise it would paste the old
// clipboard content.
hid_event.delay = SC_TICK_FROM_MS(2);
hid_event.delay = SC_TICK_FROM_MS(5);
}

if (!sc_aoa_push_hid_event(kb->aoa, &hid_event)) {
Expand Down

0 comments on commit 45b0f81

Please sign in to comment.