added delay to keypresses for reliability

This commit is contained in:
mintey 2021-04-11 22:53:48 +03:00
parent 2dc7665e85
commit cd740532f2
1 changed files with 5 additions and 0 deletions

View File

@ -506,6 +506,11 @@ void press_key(int key) {
// keypress
Keyboard.press(key);
// small delay since slower computers can drop quick inputs
// this is very much a hack, and probably messes with the debouncing etc.
// but pending a debouncing rewrite to a timer-based system this should
// work in the meanwhile provided you don't type too quickly
delay(50);
Keyboard.release(key);
// release modifiers