diff options
| author | Dmitry Obukhov | 2015-01-27 21:53:35 +0300 | 
|---|---|---|
| committer | Tomáš Znamenáček | 2015-01-28 14:57:17 +0100 | 
| commit | 0db346d02be95bd66af52c1b9cd88439084bf295 (patch) | |
| tree | 304340d017c83b039a911678c13992f7d89b9c7f /Framework/MASShortcut.m | |
| parent | 097288236819dd5ded2e9479fc1bce9509e30047 (diff) | |
| download | MASShortcut-0db346d02be95bd66af52c1b9cd88439084bf295.tar.bz2 | |
Better key equivalent handling on non-ASCII keyboard layouts.
See #60 for a discussion. In short, keyCodeStringForKeyEquivalent
should be now correct even with non-ASCII keyboard layouts such as
Russian.
Diffstat (limited to 'Framework/MASShortcut.m')
| -rw-r--r-- | Framework/MASShortcut.m | 4 | 
1 files changed, 2 insertions, 2 deletions
| diff --git a/Framework/MASShortcut.m b/Framework/MASShortcut.m index e6fa63d..ef3385d 100644 --- a/Framework/MASShortcut.m +++ b/Framework/MASShortcut.m @@ -139,10 +139,10 @@ static NSString *const MASShortcutModifierFlags = @"ModifierFlags";          case 115: return NSStringFromMASKeyCode(kMASShortcutGlyphNorthwestArrow);      } -    // Everything else should be printable so look it up in the current keyboard +    // Everything else should be printable so look it up in the current ASCII capable keyboard layout      OSStatus error = noErr;      NSString *keystroke = nil; -    TISInputSourceRef inputSource = TISCopyCurrentKeyboardLayoutInputSource(); +    TISInputSourceRef inputSource = TISCopyCurrentASCIICapableKeyboardLayoutInputSource();      if (inputSource) {          CFDataRef layoutDataRef = TISGetInputSourceProperty(inputSource, kTISPropertyUnicodeKeyLayoutData);          if (layoutDataRef) { | 
