From abf0d1134890e52930c757ce3179ddba2731e364 Mon Sep 17 00:00:00 2001 From: michael starke Date: Fri, 27 Jan 2017 10:49:03 +0100 Subject: [PATCH] do not attempt to transale an invalid key --- MacPass/MPKeyMapper.m | 3 +++ 1 file changed, 3 insertions(+) diff --git a/MacPass/MPKeyMapper.m b/MacPass/MPKeyMapper.m index f638e3ab..669ff82a 100644 --- a/MacPass/MPKeyMapper.m +++ b/MacPass/MPKeyMapper.m @@ -33,6 +33,9 @@ uint16_t const kMPUnknownKeyCode = UINT16_MAX; } + (NSString *)stringForModifiedKey:(MPModifiedKey)modifiedKey { + if(modifiedKey.keyCode == kMPUnknownKeyCode) { + return nil; + } TISInputSourceRef currentKeyboard = TISCopyCurrentKeyboardInputSource(); CFDataRef layoutData = TISGetInputSourceProperty(currentKeyboard,kTISPropertyUnicodeKeyLayoutData);