From 326c4055b27af101da0ed51b791d67ce58f89b89 Mon Sep 17 00:00:00 2001 From: michael starke Date: Thu, 26 Jan 2017 09:56:41 +0100 Subject: [PATCH] removed Ctlr kez modifier as this seems to produce no additinal characters --- MacPass/MPKeyMapper.m | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/MacPass/MPKeyMapper.m b/MacPass/MPKeyMapper.m index 288f05f2..8de5f9fd 100644 --- a/MacPass/MPKeyMapper.m +++ b/MacPass/MPKeyMapper.m @@ -98,17 +98,13 @@ uint16_t const kMPUnknownKeyCode = UINT16_MAX; 0, kCGEventFlagMaskShift, kCGEventFlagMaskAlternate, - kCGEventFlagMaskControl, - (kCGEventFlagMaskShift | kCGEventFlagMaskAlternate), - (kCGEventFlagMaskShift | kCGEventFlagMaskControl), - (kCGEventFlagMaskShift | kCGEventFlagMaskAlternate | kCGEventFlagMaskControl) + (kCGEventFlagMaskShift | kCGEventFlagMaskAlternate) }; - NSMutableDictionary *tempCharToCodeDict = [[NSMutableDictionary alloc] initWithCapacity:128]; /* Generate table of keycodes and characters. */ /* Loop through every keycode (0 - 127) to find its current mapping. */ - /* Loop throuhg every control key compbination for every virutal key */ + /* Loop throuhg every control key compbination for every virtual key */ for(CGKeyCode keyCode = 0; keyCode < 128; ++keyCode) { for(int modifierIndex = 0; modifierIndex < sizeof(modifierCombinations); modifierIndex++) { MPModifiedKey mKey = MPMakeModifiedKey(modifierCombinations[modifierIndex], keyCode); @@ -122,7 +118,7 @@ uint16_t const kMPUnknownKeyCode = UINT16_MAX; charToCodeDict = [[NSDictionary alloc] initWithDictionary:tempCharToCodeDict]; keyboardCodeDictionary[localizedName] = charToCodeDict; } - NSString *singleCharacter = [character substringToIndex:1].lowercaseString; + NSString *singleCharacter = [character substringToIndex:1]; NSValue *result = charToCodeDict[singleCharacter]; if(!result) { return MPMakeModifiedKey(0, kMPUnknownKeyCode);