Friday, 13 September 2013

How can I do somthing with F12 and Shift+Enter on macos? Use NSTextView

How can I do somthing with F12 and Shift+Enter on macos? Use NSTextView

-(void)flagsChanged:(NSEvent *)theEvent
{
NSUInteger flags = [NSEvent modifierFlags] &
NSDeviceIndependentModifierFlagsMask;
if( flags == NSShiftKeyMask ){
NSLog(@"Shift - TRUE");
} else {
NSLog(@"Shift - FALSE");
}
}

No comments:

Post a Comment