Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
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