5
0
mirror of git://git.proxmox.com/git/spiceterm.git synced 2024-12-22 13:34:06 +03:00

allow to override key mapping, but skip dead keys

This commit is contained in:
Dietmar Maurer 2013-12-11 09:37:57 +01:00
parent ecc34bb2c7
commit 078fc7355d

View File

@ -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);
}
}
@ -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;