Created
November 16, 2018 22:59
-
-
Save jmercouris/ec1c5b50106b3cc02d735b05fadc1737 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dispatch_sync(dispatch_get_main_queue(), ^{ | |
if ([event timestamp] != 1) { | |
[super sendEvent: [NSEvent keyEventWithType:NSEventTypeKeyDown | |
location:[event locationInWindow] | |
modifierFlags:[event modifierFlags] | |
timestamp:1 | |
windowNumber:[event windowNumber] | |
context:nil | |
characters:[event characters] | |
charactersIgnoringModifiers:[event charactersIgnoringModifiers] | |
isARepeat:[event isARepeat] | |
keyCode:[event keyCode]]]; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment