Created
September 26, 2011 15:16
-
-
Save moyashi/1242475 to your computer and use it in GitHub Desktop.
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
GSEventType eventType = GSEventGetType((GSEventRef)event); | |
GSEventFlags modFlag = GSEventGetModifierFlags((GSEventRef)event); | |
UniChar keyCode = GSEventGetKeyCode((GSEventRef)event); | |
NSLog(@"----------event: %d", eventType); | |
NSLog(@"----------modifier: %d", modFlag); | |
NSLog(@"----------keycode: %d", keyCode); | |
uint fCTRL = (modFlag & 1048576) ? YES : NO; | |
uint fSHIFT = (modFlag & 131072) ? YES : NO; | |
uint fALT = (modFlag & 524288) ? YES : NO; | |
uint fCMD = (modFlag & 65536) ? YES : NO; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment