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:
parent
ecc34bb2c7
commit
078fc7355d
8
input.c
8
input.c
@ -704,11 +704,8 @@ 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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static gboolean
|
||||
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user