From 078fc7355d69177740f6228fab347f2e77ecebc0 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Wed, 11 Dec 2013 09:37:57 +0100 Subject: [PATCH] allow to override key mapping, but skip dead keys --- input.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/input.c b/input.c index fa3825f..e04bbd7 100644 --- a/input.c +++ b/input.c @@ -704,10 +704,7 @@ add_keymap_entry(guint8 mask, guint8 keycode, guint keysym, guint unicode) e->keycode = keycode; e->hkey = mask << 8 | (keycode & 255); - // only insert first mapping (other are most likely dead keys) - if (!g_hash_table_lookup(keymap, &e->hkey)) { - g_hash_table_insert(keymap, &e->hkey, e); - } + g_hash_table_insert(keymap, &e->hkey, e); } @@ -752,6 +749,11 @@ parse_keymap(const char *language) if (!tok) continue; + if (tok[0] == 'd' && tok[1] == 'e' && tok[2] == 'a' && + tok[3] == 'd' && tok[4] == '_') { + continue; + } + const name2keysym_t *map = lookup_keysym(tok); if (!map && g_regex_match(uregex, tok, 0, NULL)) { char *hex = tok[1] == '+' ? tok + 2 : tok + 1;