diff options
author | Jeremy Huddleston <jeremyhu@freedesktop.org> | 2009-11-04 16:18:06 -0800 |
---|---|---|
committer | Jeremy Huddleston <jeremyhu@freedesktop.org> | 2009-11-05 18:34:50 -0800 |
commit | 069fc6ce0a0e7f2c418e11941568ffcc52b6b331 (patch) | |
tree | 7eb22300cdccd8e3a70e0840dd8dcbfe65a876db | |
parent | 6d6e8fb27f00f0c3128cef624b39a60aa754fdc8 (diff) |
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>
-rw-r--r-- | hw/xquartz/quartzKeyboard.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/hw/xquartz/quartzKeyboard.c b/hw/xquartz/quartzKeyboard.c index 1b3c27e91..90f66101f 100644 --- a/hw/xquartz/quartzKeyboard.c +++ b/hw/xquartz/quartzKeyboard.c @@ -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; } } |