Wait 0.1s between the keydown and keyup event

I observed an issue where when autotyping into the Steam client the tab
key wouldn't register. Adding a 0.1s delay between the keydown and keyup
events seems to gives the application enough time to register the key
press.
This commit is contained in:
James Hurst
2014-08-08 22:09:59 -04:00
parent a4edd4a5c2
commit 8e689c26f8

View File

@@ -196,6 +196,7 @@
/* Send the event */
CGEventPost(kCGSessionEventTap, pressKey);
usleep(100000);
CGEventPost(kCGSessionEventTap, releaseKey);
CFRelease(pressKey);