XQuartz: Don't weed out duplicates in generated keymap

There seems to be an issue in the 1.5+ server where shift-space does not
produce a space when 'keycode 57 = space' but it does when 'keycode 57 = space
space'

Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
This commit is contained in:
Jeremy Huddleston 2009-11-04 16:18:06 -08:00
parent 6d6e8fb27f
commit 069fc6ce0a
1 changed files with 9 additions and 5 deletions

View File

@ -387,6 +387,7 @@ void DarwinKeyboardReloadHandler(void) {
keySyms.minKeyCode = MIN_KEYCODE;
keySyms.maxKeyCode = MAX_KEYCODE;
// TODO: We should build the entire XkbDescRec and use XkbCopyKeymap
/* Apply the mappings to darwinKeyboard */
XkbApplyMappingChange(darwinKeyboard, &keySyms, keySyms.minKeyCode,
keySyms.maxKeyCode - keySyms.minKeyCode + 1,
@ -767,9 +768,12 @@ Bool QuartzReadSystemKeymap(darwinKeyboardInfo *info) {
#endif
}
if (k[3] == k[2]) k[3] = NoSymbol;
if (k[1] == k[0]) k[1] = NoSymbol;
if (k[0] == k[2] && k[1] == k[3]) k[2] = k[3] = NoSymbol;
// There seems to be an issue with this in 1.5+, shift-space is not
// producing space, it's sending NoSymbol... ?
//if (k[3] == k[2]) k[3] = NoSymbol;
//if (k[1] == k[0]) k[1] = NoSymbol;
//if (k[0] == k[2] && k[1] == k[3]) k[2] = k[3] = NoSymbol;
//if (k[3] == k[0] && k[2] == k[1] && k[2] == NoSymbol) k[3] = NoSymbol;
}
/* Fix up some things that are normally missing.. */
@ -780,7 +784,7 @@ Bool QuartzReadSystemKeymap(darwinKeyboardInfo *info) {
if (k[0] == NoSymbol && k[1] == NoSymbol
&& k[2] == NoSymbol && k[3] == NoSymbol)
k[0] = known_keys[i].keysym;
k[0] = k[1] = k[2] = k[3] = known_keys[i].keysym;
}
}
@ -793,7 +797,7 @@ Bool QuartzReadSystemKeymap(darwinKeyboardInfo *info) {
k = info->keyMap + known_numeric_keys[i].keycode * GLYPHS_PER_KEY;
if (k[0] == known_numeric_keys[i].normal)
k[0] = known_numeric_keys[i].keypad;
k[0] = k[1] = k[2] = k[3] = known_numeric_keys[i].keypad;
}
}