From 0db346d02be95bd66af52c1b9cd88439084bf295 Mon Sep 17 00:00:00 2001 From: Dmitry Obukhov Date: Tue, 27 Jan 2015 21:53:35 +0300 Subject: 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. --- Framework/MASShortcut.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Framework') 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) { -- cgit v1.2.3