diff options
author | Jeremy Huddleston <jeremyhu@freedesktop.org> | 2009-11-04 16:18:06 -0800 |
---|---|---|
committer | Jeremy Huddleston <jeremyhu@freedesktop.org> | 2009-11-06 11:00:38 -0800 |
commit | f203963678d42644a803bc45e82b08e6bde0b2a7 (patch) | |
tree | 616947a3c1f75ae715b3b4f7a0b487cf1e97be4a | |
parent | dfb0c502946853a5a4b39a3e9814e8d576749d69 (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>
(cherry picked from commit 069fc6ce0a0e7f2c418e11941568ffcc52b6b331)
-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; } } |