diff --git a/Clocker/Clocker/ShortcutRecorder-master/Library/SRCommon.m b/Clocker/Clocker/ShortcutRecorder-master/Library/SRCommon.m index 89ad166..b036c9f 100755 --- a/Clocker/Clocker/ShortcutRecorder-master/Library/SRCommon.m +++ b/Clocker/Clocker/ShortcutRecorder-master/Library/SRCommon.m @@ -81,10 +81,10 @@ NSString *SRReadableStringForCocoaModifierFlagsAndKeyCode(NSEventModifierFlags a NSString *c = [t transformedValue:@(aKeyCode)]; return [NSString stringWithFormat:@"%@%@%@%@%@", - (aModifierFlags & NSCommandKeyMask ? SRLoc(@"Command-") : @""), - (aModifierFlags & NSAlternateKeyMask ? SRLoc(@"Option-") : @""), - (aModifierFlags & NSControlKeyMask ? SRLoc(@"Control-") : @""), - (aModifierFlags & NSShiftKeyMask ? SRLoc(@"Shift-") : @""), + (aModifierFlags & NSEventModifierFlagCommand ? SRLoc(@"Command-") : @""), + (aModifierFlags & NSEventModifierFlagOption ? SRLoc(@"Option-") : @""), + (aModifierFlags & NSEventModifierFlagControl ? SRLoc(@"Control-") : @""), + (aModifierFlags & NSEventModifierFlagShift ? SRLoc(@"Shift-") : @""), c]; } @@ -95,10 +95,10 @@ NSString *SRReadableASCIIStringForCocoaModifierFlagsAndKeyCode(NSEventModifierFl NSString *c = [t transformedValue:@(aKeyCode)]; return [NSString stringWithFormat:@"%@%@%@%@%@", - (aModifierFlags & NSCommandKeyMask ? SRLoc(@"Command-") : @""), - (aModifierFlags & NSAlternateKeyMask ? SRLoc(@"Option-") : @""), - (aModifierFlags & NSControlKeyMask ? SRLoc(@"Control-") : @""), - (aModifierFlags & NSShiftKeyMask ? SRLoc(@"Shift-") : @""), + (aModifierFlags & NSEventModifierFlagCommand ? SRLoc(@"Command-") : @""), + (aModifierFlags & NSEventModifierFlagOption ? SRLoc(@"Option-") : @""), + (aModifierFlags & NSEventModifierFlagControl ? SRLoc(@"Control-") : @""), + (aModifierFlags & NSEventModifierFlagShift ? SRLoc(@"Shift-") : @""), c]; } diff --git a/Clocker/Clocker/ShortcutRecorder-master/Library/SRKeyCodeTransformer.m b/Clocker/Clocker/ShortcutRecorder-master/Library/SRKeyCodeTransformer.m index 2595f7c..358a0c6 100755 --- a/Clocker/Clocker/ShortcutRecorder-master/Library/SRKeyCodeTransformer.m +++ b/Clocker/Clocker/ShortcutRecorder-master/Library/SRKeyCodeTransformer.m @@ -340,7 +340,7 @@ FOUNDATION_STATIC_INLINE NSString* _SRUnicharToString(unichar aChar) - (NSString *)transformedSpecialKeyCode:(NSNumber *)aKeyCode withExplicitModifierFlags:(NSNumber *)anExplicitModifierFlags { - if ([anExplicitModifierFlags unsignedIntegerValue] & NSShiftKeyMask && [aKeyCode unsignedShortValue] == kVK_Tab) + if ([anExplicitModifierFlags unsignedIntegerValue] & NSEventModifierFlagShift && [aKeyCode unsignedShortValue] == kVK_Tab) { if (self.usesPlainStrings) return _SRUnicharToString(SRKeyCodeGlyphTabLeft); diff --git a/Clocker/Clocker/ShortcutRecorder-master/Library/SRModifierFlagsTransformer.m b/Clocker/Clocker/ShortcutRecorder-master/Library/SRModifierFlagsTransformer.m index 0413887..f99b97b 100755 --- a/Clocker/Clocker/ShortcutRecorder-master/Library/SRModifierFlagsTransformer.m +++ b/Clocker/Clocker/ShortcutRecorder-master/Library/SRModifierFlagsTransformer.m @@ -77,16 +77,16 @@ NSEventModifierFlags modifierFlags = [aValue unsignedIntegerValue]; NSMutableString *s = [NSMutableString string]; - if (modifierFlags & NSControlKeyMask) + if (modifierFlags & NSEventModifierFlagControl) [s appendString:SRLoc(@"Control-")]; - if (modifierFlags & NSAlternateKeyMask) + if (modifierFlags & NSEventModifierFlagOption) [s appendString:SRLoc(@"Option-")]; - if (modifierFlags & NSShiftKeyMask) + if (modifierFlags & NSEventModifierFlagShift) [s appendString:SRLoc(@"Shift-")]; - if (modifierFlags & NSCommandKeyMask) + if (modifierFlags & NSEventModifierFlagCommand) [s appendString:SRLoc(@"Command-")]; if (s.length > 0) @@ -98,10 +98,10 @@ { NSEventModifierFlags f = [aValue unsignedIntegerValue]; return [NSString stringWithFormat:@"%@%@%@%@", - (f & NSControlKeyMask ? @"⌃" : @""), - (f & NSAlternateKeyMask ? @"⌥" : @""), - (f & NSShiftKeyMask ? @"⇧" : @""), - (f & NSCommandKeyMask ? @"⌘" : @"")]; + (f & NSEventModifierFlagControl ? @"⌃" : @""), + (f & NSEventModifierFlagOption ? @"⌥" : @""), + (f & NSEventModifierFlagShift ? @"⇧" : @""), + (f & NSEventModifierFlagCommand ? @"⌘" : @"")]; } } diff --git a/Clocker/Clocker/ShortcutRecorder-master/PTHotKey/PTHotKeyCenter.m b/Clocker/Clocker/ShortcutRecorder-master/PTHotKey/PTHotKeyCenter.m index e233c0f..a110af8 100755 --- a/Clocker/Clocker/ShortcutRecorder-master/PTHotKey/PTHotKeyCenter.m +++ b/Clocker/Clocker/ShortcutRecorder-master/PTHotKey/PTHotKeyCenter.m @@ -207,7 +207,7 @@ static PTHotKeyCenter *_sharedHotKeyCenter = nil; short subType; EventHotKeyRef carbonHotKey; - if( [event type] == NSSystemDefined ) + if( [event type] == NSEventTypeSystemDefined ) { subType = [event subtype]; diff --git a/Clocker/Clocker/ShortcutRecorder-master/PTHotKey/PTKeyCombo.m b/Clocker/Clocker/ShortcutRecorder-master/PTHotKey/PTKeyCombo.m index fb07157..900508b 100755 --- a/Clocker/Clocker/ShortcutRecorder-master/PTHotKey/PTKeyCombo.m +++ b/Clocker/Clocker/ShortcutRecorder-master/PTHotKey/PTKeyCombo.m @@ -49,7 +49,7 @@ case kVK_F18: case kVK_F19: case kVK_F20: - mModifiers = modifiers | NSFunctionKeyMask; + mModifiers = modifiers | NSEventModifierFlagFunction; break; default: mModifiers = modifiers;