Added better test for modifier base key presses

This commit is contained in:
michael starke
2014-12-03 14:36:36 +01:00
parent c2985d2faa
commit 7ce789790c
7 changed files with 127 additions and 79 deletions

View File

@@ -319,10 +319,10 @@
CGEventRef pressKey = CGEventCreateKeyboardEvent (eventSource, keyCode, YES);
CGEventRef releaseKey = CGEventCreateKeyboardEvent (eventSource, keyCode, NO);
/* The modifer Masks might be set, reset them */
CGEventSetFlags(pressKey,0);
CGEventSetFlags(releaseKey, 0);
/* Set the modifiers to the ones we want */
/*
Set the modifiers to the ones we want
We use our private event source so no modifier reset should be needed
*/
CGEventSetFlags(pressKey,flags);
CGEventSetFlags(releaseKey, flags);