Created
June 6, 2011 14:58
-
-
Save skahack/1010405 to your computer and use it in GitHub Desktop.
Backspace、Function keyなどのイベントを送信
This file contains 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
const unichar ch = NSBackspaceCharacter; | |
NSString *backspace = [NSString stringWithCharacters:&ch length:1]; | |
NSEvent *e = [NSEvent keyEventWithType:NSKeyDown | |
location:NSMakePoint(0, 0) | |
modifierFlags:0 | |
timestamp:0 | |
windowNumber:0 | |
context:[NSGraphicsContext currentContext] | |
characters:backspace | |
charactersIgnoringModifiers:backspace | |
isARepeat:NO | |
keyCode:0]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment