removed Ctlr kez modifier as this seems to produce no additinal characters

This commit is contained in:
michael starke
2017-01-26 09:56:41 +01:00
parent 72574e730a
commit 326c4055b2

View File

@@ -98,17 +98,13 @@ uint16_t const kMPUnknownKeyCode = UINT16_MAX;
0, 0,
kCGEventFlagMaskShift, kCGEventFlagMaskShift,
kCGEventFlagMaskAlternate, kCGEventFlagMaskAlternate,
kCGEventFlagMaskControl, (kCGEventFlagMaskShift | kCGEventFlagMaskAlternate)
(kCGEventFlagMaskShift | kCGEventFlagMaskAlternate),
(kCGEventFlagMaskShift | kCGEventFlagMaskControl),
(kCGEventFlagMaskShift | kCGEventFlagMaskAlternate | kCGEventFlagMaskControl)
}; };
NSMutableDictionary *tempCharToCodeDict = [[NSMutableDictionary alloc] initWithCapacity:128]; NSMutableDictionary *tempCharToCodeDict = [[NSMutableDictionary alloc] initWithCapacity:128];
/* Generate table of keycodes and characters. */ /* Generate table of keycodes and characters. */
/* Loop through every keycode (0 - 127) to find its current mapping. */ /* 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(CGKeyCode keyCode = 0; keyCode < 128; ++keyCode) {
for(int modifierIndex = 0; modifierIndex < sizeof(modifierCombinations); modifierIndex++) { for(int modifierIndex = 0; modifierIndex < sizeof(modifierCombinations); modifierIndex++) {
MPModifiedKey mKey = MPMakeModifiedKey(modifierCombinations[modifierIndex], keyCode); MPModifiedKey mKey = MPMakeModifiedKey(modifierCombinations[modifierIndex], keyCode);
@@ -122,7 +118,7 @@ uint16_t const kMPUnknownKeyCode = UINT16_MAX;
charToCodeDict = [[NSDictionary alloc] initWithDictionary:tempCharToCodeDict]; charToCodeDict = [[NSDictionary alloc] initWithDictionary:tempCharToCodeDict];
keyboardCodeDictionary[localizedName] = charToCodeDict; keyboardCodeDictionary[localizedName] = charToCodeDict;
} }
NSString *singleCharacter = [character substringToIndex:1].lowercaseString; NSString *singleCharacter = [character substringToIndex:1];
NSValue *result = charToCodeDict[singleCharacter]; NSValue *result = charToCodeDict[singleCharacter];
if(!result) { if(!result) {
return MPMakeModifiedKey(0, kMPUnknownKeyCode); return MPMakeModifiedKey(0, kMPUnknownKeyCode);