Reinstate support for 10.6. Add support for 10.5 https://github.com/ryandesign/cliclick/tree/legacy --- Actions/KeyBaseAction.m.orig +++ Actions/KeyBaseAction.m @@ -29,6 +29,18 @@ #import "KeyBaseAction.h" #import "ExecutionOptions.h" +// Compatibility code for 10.5 and earlier +#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060 || MAC_OS_X_VERSION_MIN_REQUIRED < 1060 +@interface NSString (Support) +- (NSComparisonResult)numericCompare:(NSString *)otherString; +@end +@implementation NSString (Support) +- (NSComparisonResult)numericCompare:(NSString *)otherString { + return [self compare:otherString options:NSNumericSearch]; +} +@end +#endif + @implementation KeyBaseAction + (NSDictionary *)getSupportedKeycodes { @@ -39,9 +51,26 @@ + (NSString *)getSupportedKeysIndentedWith:(NSString *)indent { - NSArray *sortedkeyNames = [[[[self class] getSupportedKeycodes] allKeys] sortedArrayUsingComparator:^(id obj1, id obj2) { - return [obj1 compare:obj2 options:NSNumericSearch]; - }]; + NSArray *allKeys = [[[self class] getSupportedKeycodes] allKeys]; + NSArray *sortedkeyNames; +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060 +#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060 + if ([allKeys respondsToSelector:@selector(sortedArrayUsingComparator:)]) +#endif + { + sortedkeyNames = [allKeys sortedArrayUsingComparator:^(id obj1, id obj2) { + return [obj1 compare:obj2 options:NSNumericSearch]; + }]; + } +#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060 + else +#endif +#endif +#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060 || MAC_OS_X_VERSION_MIN_REQUIRED < 1060 + { + sortedkeyNames = [allKeys sortedArrayUsingSelector:@selector(numericCompare:)]; + } +#endif return [NSString stringWithFormat:@"%@%@", indent, [sortedkeyNames componentsJoinedByString:[@"\n" stringByAppendingString:indent]]]; } --- KeycodeInformer.m.orig +++ KeycodeInformer.m @@ -64,13 +64,14 @@ map = [[NSMutableDictionary alloc] initWithCapacity:256]; - NSArray *keyCodes = [NSArray arrayWithObjects: @0, @1, @2, @3, @4, @5, @6, @7, @8, @9, - @10, @11, @12, @13, @14, @15, @16, @17, @18, @19, - @20, @21, @22, @23, @24, @25, @26, @27, @28, @29, - @30, @31, @32, @33, @34, @35, @37, @38, @39, - @40, @41, @42, @43, @44, @45, @46, @47, @49, - @50, nil]; - + // The N(123) macro is equivalent to @123, but is used for 10.6 compatibility + NSArray *keyCodes = [NSArray arrayWithObjects: N(0), N(1), N(2), N(3), N(4), N(5), N(6), N(7), N(8), N(9), + N(10), N(11), N(12), N(13), N(14), N(15), N(16), N(17), N(18), N(19), + N(20), N(21), N(22), N(23), N(24), N(25), N(26), N(27), N(28), N(29), + N(30), N(31), N(32), N(33), N(34), N(35), N(37), N(38), N(39), + N(40), N(41), N(42), N(43), N(44), N(45), N(46), N(47), N(49), + N(50), nil]; + for (NSNumber *keyCode in keyCodes) { NSString *string1 = [self stringForKeyCode:(CGKeyCode)[keyCode intValue] andModifiers:0]; [map setObject:[NSArray arrayWithObjects:keyCode, [NSNumber numberWithInt:0], nil] @@ -188,62 +189,64 @@ // be typed by a combination of keys, but require consecutive key presses. Many // characters are missing, as I did not yet find a way to auto-generate the map. + // Note: The D(...) macro is equivalent to @{...}, but is used for 10.6 compatibility + if ([@"German" isEqualToString:layoutName]) { #pragma mark - German replacement map // #SUPPORTED German: ÄËÏÖÜŸäëïöüÿÁÉÍÓÚáéíóúÀÈÌÒÙàèìòùÂÊÎÔÛâêîôûÃÕÑãõñ // #KNOWN_UNSUPPORTED German: ŃńǸǹŇňŘřŠšŮů - return @{ + return D( // Umlauts - @"Ë": @"¨E", - @"Ÿ": @"¨Y", - @"ë": @"¨e", - @"ï": @"¨i", - @"ÿ": @"¨y", + @"Ë", @"¨E", + @"Ÿ", @"¨Y", + @"ë", @"¨e", + @"ï", @"¨i", + @"ÿ", @"¨y", // Acute - @"Á": @"´A", - @"É": @"´E", - @"Í": @"´I", - @"Ó": @"´O", - @"Ú": @"´U", - @"á": @"´a", - @"é": @"´e", - @"í": @"´i", - @"ó": @"´o", - @"ú": @"´u", + @"Á", @"´A", + @"É", @"´E", + @"Í", @"´I", + @"Ó", @"´O", + @"Ú", @"´U", + @"á", @"´a", + @"é", @"´e", + @"í", @"´i", + @"ó", @"´o", + @"ú", @"´u", // Agrave - @"À": @"`A", - @"È": @"`E", - @"Ì": @"`I", - @"Ò": @"`O", - @"Ù": @"`U", - @"à": @"`a", - @"è": @"`e", - @"ì": @"`i", - @"ò": @"`o", - @"ù": @"`u", + @"À", @"`A", + @"È", @"`E", + @"Ì", @"`I", + @"Ò", @"`O", + @"Ù", @"`U", + @"à", @"`a", + @"è", @"`e", + @"ì", @"`i", + @"ò", @"`o", + @"ù", @"`u", // Circumflex - @"Â": @"^A", - @"Ê": @"^E", - @"Î": @"^I", - @"Ô": @"^O", - @"Û": @"^U", - @"â": @"^a", - @"ê": @"^e", - @"î": @"^i", - @"ô": @"^o", - @"û": @"^u", + @"Â", @"^A", + @"Ê", @"^E", + @"Î", @"^I", + @"Ô", @"^O", + @"Û", @"^U", + @"â", @"^a", + @"ê", @"^e", + @"î", @"^i", + @"ô", @"^o", + @"û", @"^u", // Tilde - @"Ã": @"~A", - @"Ñ": @"~N", - @"Õ": @"~O", - @"ã": @"~a", - @"ñ": @"~n", - @"õ": @"~o" - }; + @"Ã", @"~A", + @"Ñ", @"~N", + @"Õ", @"~O", + @"ã", @"~a", + @"ñ", @"~n", + @"õ", @"~o" + ); } if ([@"U.S. Extended" isEqualToString:layoutName]) { @@ -251,363 +254,363 @@ // #SUPPORTED U.S. Extended: ÄËÏÖÜŸäëïöüÿÁÉÍÓÚáéíóúÀÈÌÒÙàèìòùÂÊÎÔÛâêîôûÃÕÑãõñŃńǸǹŇňŘřŠšÅåŮů // #KNOWN_UNSUPPORTED U.S. Extended: // See http://symbolcodes.tlt.psu.edu/accents/codemacext.html - return @{ + return D( // Umlauts - @"Ä": @"¨A", - @"Ë": @"¨E", - @"Ï": @"¨I", - @"Ö": @"¨O", - @"Ü": @"¨U", - @"Ÿ": @"¨Y", - @"ä": @"¨a", - @"ë": @"¨e", - @"ï": @"¨i", - @"ö": @"¨o", - @"ü": @"¨u", - @"ÿ": @"¨y", + @"Ä", @"¨A", + @"Ë", @"¨E", + @"Ï", @"¨I", + @"Ö", @"¨O", + @"Ü", @"¨U", + @"Ÿ", @"¨Y", + @"ä", @"¨a", + @"ë", @"¨e", + @"ï", @"¨i", + @"ö", @"¨o", + @"ü", @"¨u", + @"ÿ", @"¨y", // Acute - @"Á": @"´A", - @"É": @"´E", - @"Í": @"´I", - @"Ń": @"´N", - @"Ó": @"´O", - @"Ú": @"´U", - @"á": @"´a", - @"é": @"´e", - @"í": @"´i", - @"ń": @"´n", - @"ó": @"´o", - @"ú": @"´u", + @"Á", @"´A", + @"É", @"´E", + @"Í", @"´I", + @"Ń", @"´N", + @"Ó", @"´O", + @"Ú", @"´U", + @"á", @"´a", + @"é", @"´e", + @"í", @"´i", + @"ń", @"´n", + @"ó", @"´o", + @"ú", @"´u", // Agrave - @"À": @"`A", - @"È": @"`E", - @"Ì": @"`I", - @"Ǹ": @"`N", - @"Ò": @"`O", - @"Ù": @"`U", - @"à": @"`a", - @"è": @"`e", - @"ì": @"`i", - @"ò": @"`o", - @"ù": @"`u", - @"ǹ": @"`n", + @"À", @"`A", + @"È", @"`E", + @"Ì", @"`I", + @"Ǹ", @"`N", + @"Ò", @"`O", + @"Ù", @"`U", + @"à", @"`a", + @"è", @"`e", + @"ì", @"`i", + @"ò", @"`o", + @"ù", @"`u", + @"ǹ", @"`n", // Circumflex - @"Â": @"ˆA", - @"Ê": @"ˆE", - @"Î": @"ˆI", - @"Ô": @"ˆO", - @"Û": @"ˆU", - @"â": @"ˆa", - @"ê": @"ˆe", - @"î": @"ˆi", - @"ô": @"ˆo", - @"û": @"ˆu", + @"Â", @"ˆA", + @"Ê", @"ˆE", + @"Î", @"ˆI", + @"Ô", @"ˆO", + @"Û", @"ˆU", + @"â", @"ˆa", + @"ê", @"ˆe", + @"î", @"ˆi", + @"ô", @"ˆo", + @"û", @"ˆu", // Tilde - @"Ã": @"˜A", - @"Ñ": @"˜N", - @"Õ": @"˜O", - @"ã": @"˜a", - @"ñ": @"˜n", - @"õ": @"˜o", + @"Ã", @"˜A", + @"Ñ", @"˜N", + @"Õ", @"˜O", + @"ã", @"˜a", + @"ñ", @"˜n", + @"õ", @"˜o", // Caron - @"Ň": @"ˇN", - @"Ř": @"ˇR", - @"Š": @"ˇS", - @"ň": @"ˇn", - @"ř": @"ˇr", - @"š": @"ˇs", + @"Ň", @"ˇN", + @"Ř", @"ˇR", + @"Š", @"ˇS", + @"ň", @"ˇn", + @"ř", @"ˇr", + @"š", @"ˇs", // A ring - @"Å": @"˚A", - @"å": @"˚a", - @"Ů": @"˚U", - @"ů": @"˚u" - }; + @"Å", @"˚A", + @"å", @"˚a", + @"Ů", @"˚U", + @"ů", @"˚u" + ); } if ([@"Polish" isEqualToString:layoutName]) { #pragma mark - Polish replacement map // #SUPPORTED Polish: ÄÖÜäöüÁÉÍÓÚáéíóúŃńŇňŘřŠš // #KNOWN_UNSUPPORTED Polish: ËÏŸëïÿÀÈÌÒÙàèìòùǸǹÂÊÎÔÛâêîôûÃÕÑãõñŒœÅåØøÆæ - return @{ + return D( // Umlauts - @"Ä": @"¨A", - @"Ö": @"¨O", - @"Ü": @"¨U", - @"ä": @"¨a", - @"ö": @"¨o", - @"ü": @"¨u", + @"Ä", @"¨A", + @"Ö", @"¨O", + @"Ü", @"¨U", + @"ä", @"¨a", + @"ö", @"¨o", + @"ü", @"¨u", // Acute - @"Á": @"´A", - @"É": @"´E", - @"Í": @"´I", - @"Ú": @"´U", - @"á": @"´a", - @"é": @"´e", - @"í": @"´i", - @"ú": @"´u", - - // Caron - @"Ň": @"ˇN", - @"Ř": @"ˇR", - @"Š": @"ˇS", - @"ň": @"ˇn", - @"ř": @"ˇr", - @"š": @"ˇs" - }; + @"Á", @"´A", + @"É", @"´E", + @"Í", @"´I", + @"Ú", @"´U", + @"á", @"´a", + @"é", @"´e", + @"í", @"´i", + @"ú", @"´u", + + // Caron + @"Ň", @"ˇN", + @"Ř", @"ˇR", + @"Š", @"ˇS", + @"ň", @"ˇn", + @"ř", @"ˇr", + @"š", @"ˇs" + ); } if ([@"French" isEqualToString:layoutName]) { #pragma mark - French replacement map // #SUPPORTED French: ÄËÏÖÜŸäëïöüÿÁÉÍÓÚáéíóúÀÈÌÒÙàèìòùÂÊÎÔÛâêîôû // #KNOWN_UNSUPPORTED French: ÃÑÕãñõŃńǸǹŇňŘřŠšŮů - return @{ + return D( // Umlauts - @"Ä": @"¨A", - @"Ë": @"¨E", - @"Ö": @"¨O", - @"Ü": @"¨U", - @"ä": @"¨a", - @"ë": @"¨e", - @"ö": @"¨o", - @"ü": @"¨u", - @"ÿ": @"¨y", + @"Ä", @"¨A", + @"Ë", @"¨E", + @"Ö", @"¨O", + @"Ü", @"¨U", + @"ä", @"¨a", + @"ë", @"¨e", + @"ö", @"¨o", + @"ü", @"¨u", + @"ÿ", @"¨y", // Acute - @"É": @"´E", - @"á": @"´a", - @"í": @"´i", - @"ó": @"´o", - @"ú": @"´u", + @"É", @"´E", + @"á", @"´a", + @"í", @"´i", + @"ó", @"´o", + @"ú", @"´u", // Agrave - @"À": @"`A", - @"ì": @"`i", - @"ò": @"`o", + @"À", @"`A", + @"ì", @"`i", + @"ò", @"`o", // Circumflex - @"â": @"^A", - @"û": @"^U", - @"Ǹ": @"`N", - @"ǹ": @"`n" - }; + @"â", @"^A", + @"û", @"^U", + @"Ǹ", @"`N", + @"ǹ", @"`n" + ); } if ([@"Canadian French - CSA" isEqualToString:layoutName]) { #pragma mark - Canadian French replacement map // #SUPPORTED Canadian French - CSA: ÄËÏÖÜŸäëïöüÿÁÉÍÓÚáéíóúÀÈÌÒÙàèìòùÂÊÎÔÛâêîôûÃÑÕãñõ // #KNOWN_UNSUPPORTED Canadian French - CSA: ŇŘŠňřšǸǹŃńÅåŮů - return @{ + return D( // Umlauts - @"Ä": @"¨A", - @"Ë": @"¨E", - @"Ï": @"¨I", - @"Ö": @"¨O", - @"Ü": @"¨U", - @"Ÿ": @"¨Y", - @"ä": @"¨a", - @"ë": @"¨e", - @"ï": @"¨i", - @"ö": @"¨o", - @"ü": @"¨u", - @"ÿ": @"¨y", + @"Ä", @"¨A", + @"Ë", @"¨E", + @"Ï", @"¨I", + @"Ö", @"¨O", + @"Ü", @"¨U", + @"Ÿ", @"¨Y", + @"ä", @"¨a", + @"ë", @"¨e", + @"ï", @"¨i", + @"ö", @"¨o", + @"ü", @"¨u", + @"ÿ", @"¨y", // Acute - @"Á": @"´A", - @"É": @"´E", - @"Í": @"´I", - @"Ó": @"´O", - @"Ú": @"´U", - @"á": @"´a", - @"í": @"´i", - @"ó": @"´o", - @"ú": @"´u", + @"Á", @"´A", + @"É", @"´E", + @"Í", @"´I", + @"Ó", @"´O", + @"Ú", @"´U", + @"á", @"´a", + @"í", @"´i", + @"ó", @"´o", + @"ú", @"´u", // Agrave - @"Ì": @"`I", - @"Ò": @"`O", - @"ì": @"`i", - @"ò": @"`o", + @"Ì", @"`I", + @"Ò", @"`O", + @"ì", @"`i", + @"ò", @"`o", // Circumflex - @"Â": @"^A", - @"Ê": @"^E", - @"Î": @"^I", - @"Ô": @"^O", - @"Û": @"^U", - @"â": @"^a", - @"ê": @"^e", - @"î": @"^i", - @"ô": @"^o", - @"û": @"^u", + @"Â", @"^A", + @"Ê", @"^E", + @"Î", @"^I", + @"Ô", @"^O", + @"Û", @"^U", + @"â", @"^a", + @"ê", @"^e", + @"î", @"^i", + @"ô", @"^o", + @"û", @"^u", // Tilde - @"Ã": @"~A", - @"Ñ": @"~N", - @"Õ": @"~O", - @"ã": @"~a", - @"ñ": @"~n", - @"õ": @"~o" - }; + @"Ã", @"~A", + @"Ñ", @"~N", + @"Õ", @"~O", + @"ã", @"~a", + @"ñ", @"~n", + @"õ", @"~o" + ); } if ([@"Spanish" isEqualToString:layoutName]) { #pragma mark - Spanish replacement map // #SUPPORTED Spanish: ÄËÏÖÜŸäëïöüÿÁÉÍÓÚáéíóúÀÈÌÒÙàèìòùÂÊÎÔÛâêîôûÑñ // #KNOWN_UNSUPPORTED Spanish: ÃÕãõŇŘŠňřšǸǹŃńŮů - return @{ + return D( // Umlauts - @"Ä": @"¨A", - @"Ë": @"¨E", - @"Ö": @"¨O", - @"Ü": @"¨U", - @"ä": @"¨a", - @"ë": @"¨e", - @"ï": @"¨i", - @"ö": @"¨o", - @"ü": @"¨u", - @"ÿ": @"¨y", + @"Ä", @"¨A", + @"Ë", @"¨E", + @"Ö", @"¨O", + @"Ü", @"¨U", + @"ä", @"¨a", + @"ë", @"¨e", + @"ï", @"¨i", + @"ö", @"¨o", + @"ü", @"¨u", + @"ÿ", @"¨y", // Acute - @"É": @"´E", - @"í": @"´i", - @"á": @"´a", - @"é": @"´e", - @"ó": @"´o", - @"ú": @"´u", + @"É", @"´E", + @"í", @"´i", + @"á", @"´a", + @"é", @"´e", + @"ó", @"´o", + @"ú", @"´u", // Agrave - @"À": @"`A", - @"à": @"`a", - @"è": @"`e", - @"ì": @"`i", - @"ò": @"`o", - @"ù": @"`u", + @"À", @"`A", + @"à", @"`a", + @"è", @"`e", + @"ì", @"`i", + @"ò", @"`o", + @"ù", @"`u", // Circumflex - @"â": @"^a", - @"ê": @"^e", - @"î": @"^i", - @"ô": @"^o", - @"û": @"^u" - }; + @"â", @"^a", + @"ê", @"^e", + @"î", @"^i", + @"ô", @"^o", + @"û", @"^u" + ); } if ([@"Portuguese" isEqualToString:layoutName]) { #pragma mark - Portuguese replacement map // #SUPPORTED Portuguese: ÄËÏÖÜäëïöüÿÁÉÍÓÚáéíóúÀÈÌÒÙàèìòùÂÊÎÔÛâêîôûÑñÃÕãõ // #KNOWN_UNSUPPORTED Portuguese: ŸŇŘŠňřšǸǹŃńŮů - return @{ + return D( // Umlauts - @"Ä": @"¨A", - @"Ë": @"¨E", - @"Ï": @"¨I", - @"Ö": @"¨O", - @"Ü": @"¨U", - @"ä": @"¨a", - @"ë": @"¨e", - @"ï": @"¨i", - @"ö": @"¨o", - @"ü": @"¨u", - @"ÿ": @"¨y", + @"Ä", @"¨A", + @"Ë", @"¨E", + @"Ï", @"¨I", + @"Ö", @"¨O", + @"Ü", @"¨U", + @"ä", @"¨a", + @"ë", @"¨e", + @"ï", @"¨i", + @"ö", @"¨o", + @"ü", @"¨u", + @"ÿ", @"¨y", // Acute - @"Á": @"´A", - @"É": @"´E", - @"Í": @"´I", - @"Ó": @"´O", - @"Ú": @"´U", - @"á": @"´a", - @"é": @"´e", - @"í": @"´i", - @"ó": @"´o", - @"ú": @"´u", + @"Á", @"´A", + @"É", @"´E", + @"Í", @"´I", + @"Ó", @"´O", + @"Ú", @"´U", + @"á", @"´a", + @"é", @"´e", + @"í", @"´i", + @"ó", @"´o", + @"ú", @"´u", // Agrave - @"À": @"`A", - @"È": @"`E", - @"Ì": @"`I", - @"Ò": @"`O", - @"Ù": @"`U", - @"à": @"`a", - @"è": @"`e", - @"ì": @"`i", - @"ò": @"`o", - @"ù": @"`u", + @"À", @"`A", + @"È", @"`E", + @"Ì", @"`I", + @"Ò", @"`O", + @"Ù", @"`U", + @"à", @"`a", + @"è", @"`e", + @"ì", @"`i", + @"ò", @"`o", + @"ù", @"`u", // Circumflex - @"Â": @"^A", - @"Ê": @"^E", - @"Î": @"^I", - @"Ô": @"^O", - @"Û": @"^U", - @"â": @"^a", - @"ê": @"^e", - @"î": @"^i", - @"ô": @"^o", - @"û": @"^u", + @"Â", @"^A", + @"Ê", @"^E", + @"Î", @"^I", + @"Ô", @"^O", + @"Û", @"^U", + @"â", @"^a", + @"ê", @"^e", + @"î", @"^i", + @"ô", @"^o", + @"û", @"^u", // Tilde - @"Ã": @"˜A", - @"Õ": @"˜O", - @"Ñ": @"˜N", - @"ã": @"˜a", - @"õ": @"˜o", - @"ñ": @"˜n" - }; + @"Ã", @"˜A", + @"Õ", @"˜O", + @"Ñ", @"˜N", + @"ã", @"˜a", + @"õ", @"˜o", + @"ñ", @"˜n" + ); } if ([@"Italian" isEqualToString:layoutName]) { #pragma mark - Italian replacement map // #SUPPORTED Italian: ÄËÏÖÜŸäëïöüÿÁÉÍÓÚáéíóúÀÈÌÒÙàèìòùÂÊÎÔÛâêîôûÑñÃÕãõ // #KNOWN_UNSUPPORTED Italian: ŸŇŘŠňřšǸǹŃńŮů - return @{ + return D( // Umlauts - @"Ä": @"¨A", - @"Ë": @"¨E", - @"Ï": @"¨I", - @"Ö": @"¨O", - @"Ü": @"¨U", - @"Ÿ": @"¨Y", - @"ä": @"¨a", - @"ë": @"¨e", - @"ï": @"¨i", - @"ö": @"¨o", - @"ü": @"¨u", - @"ÿ": @"¨y", + @"Ä", @"¨A", + @"Ë", @"¨E", + @"Ï", @"¨I", + @"Ö", @"¨O", + @"Ü", @"¨U", + @"Ÿ", @"¨Y", + @"ä", @"¨a", + @"ë", @"¨e", + @"ï", @"¨i", + @"ö", @"¨o", + @"ü", @"¨u", + @"ÿ", @"¨y", // Acute - @"á": @"´a", - @"í": @"´i", - @"ó": @"´o", - @"ú": @"´u", + @"á", @"´a", + @"í", @"´i", + @"ó", @"´o", + @"ú", @"´u", // Circumflex - @"Â": @"ˆA", - @"Ê": @"ˆE", - @"Î": @"ˆI", - @"Ô": @"ˆO", - @"Û": @"ˆU", - @"â": @"ˆa", - @"ê": @"ˆe", - @"î": @"ˆi", - @"ô": @"ˆo", - @"û": @"ˆu", - + @"Â", @"ˆA", + @"Ê", @"ˆE", + @"Î", @"ˆI", + @"Ô", @"ˆO", + @"Û", @"ˆU", + @"â", @"ˆa", + @"ê", @"ˆe", + @"î", @"ˆi", + @"ô", @"ˆo", + @"û", @"ˆu", + // Tilde - @"Ã": @"˜A", - @"Ñ": @"˜N", - @"Õ": @"˜O", - @"ã": @"˜a", - @"ñ": @"˜n", - @"õ": @"˜o" - }; + @"Ã", @"˜A", + @"Ñ", @"˜N", + @"Õ", @"˜O", + @"ã", @"˜a", + @"ñ", @"˜n", + @"õ", @"˜o" + ); } if ([@"Canadian English" isEqualToString:layoutName]) { --- README.markdown.orig +++ README.markdown @@ -1,7 +1,7 @@ cliclick Overview ========================= -cliclick (short for “Command Line Interface Click”) is a tool for executing mouse- and keyboard-related actions from the shell/Terminal. It is written in Objective-C and runs on OS X 10.9 or later. +cliclick (short for “Command Line Interface Click”) is a tool for executing mouse- and keyboard-related actions from the shell/Terminal. It is written in Objective-C and runs on Mac OS X 10.5 or later. For more information or for downloading a compiled binary, please take a look at [cliclick’s homepage](https://www.bluem.net/jump/cliclick/) @@ -205,7 +205,7 @@ ----------------- Either build in Xcode, as usual, or build from the shell by `cd`ing into the project directory and then invoking either `xcodebuild` or `make` (whatever you prefer). In either case, cliclick will not be installed, but you will simply get an executable called “cliclick” in the project directory which you can then move wherever you want to have it. (You can put it anywhere you like.) To install it to `/usr/local/bin`, you can also simply invoke `sudo make install`, which will do this for you. -Please note that while the code will run on OS X 10.9 and later, Base SDK and architectures selected in the Xcode project are set to the current SDK. Therefore, if you want to build for an older system, be sure to change these settings accordingly. If you have problems when building and get a message complaining about undefined symbols, chances are that this can be fixed by disabling “Implicitly link Objective-C Runtime Support” in the build settings. +Please note that while the code will run on Mac OS X 10.5 and later, Base SDK and architectures selected in the Xcode project are set to the current SDK. Therefore, if you want to build for an older system, be sure to change these settings accordingly. If you have problems when building and get a message complaining about undefined symbols, chances are that this can be fixed by disabling “Implicitly link Objective-C Runtime Support” in the build settings. Contributing ------------ --- cliclick_Prefix.pch.orig +++ cliclick_Prefix.pch @@ -7,6 +7,10 @@ #import #endif +// Compatibility macros for 10.6, which knows neither @123 nor @{@"Foo": @"Bar"} +#define N(x) [NSNumber numberWithInt: x] +#define D(...) [NSDictionary dictionaryWithObjectsAndKeys:__VA_ARGS__, nil] + // Version or branch #define VERSION @"4.0.1"