mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-19 05:33:44 -04:00
input: key-binding: log error when we fail to translate to XKB symbol
This commit is contained in:
parent
ff3d4f89e9
commit
fb5ab022de
1 changed files with 10 additions and 1 deletions
11
input.c
11
input.c
|
|
@ -117,7 +117,7 @@ input_parse_key_binding_for_action(
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
xkb_mod_mask_t mod_mask = 0;
|
xkb_mod_mask_t mod_mask = 0;
|
||||||
xkb_keysym_t sym = 0;
|
xkb_keysym_t sym = XKB_KEY_NoSymbol;
|
||||||
|
|
||||||
char *copy = strdup(combos);
|
char *copy = strdup(combos);
|
||||||
|
|
||||||
|
|
@ -146,11 +146,20 @@ input_parse_key_binding_for_action(
|
||||||
} else {
|
} else {
|
||||||
/* Symbol */
|
/* Symbol */
|
||||||
sym = xkb_keysym_from_name(key, 0);
|
sym = xkb_keysym_from_name(key, 0);
|
||||||
|
|
||||||
|
if (sym == XKB_KEY_NoSymbol) {
|
||||||
|
LOG_ERR("%s: key binding is not a valid XKB symbol name",
|
||||||
|
key);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_DBG("action=%u: mods=0x%08x, sym=%d", action, mod_mask, sym);
|
LOG_DBG("action=%u: mods=0x%08x, sym=%d", action, mod_mask, sym);
|
||||||
|
|
||||||
|
if (sym == XKB_KEY_NoSymbol)
|
||||||
|
continue;
|
||||||
|
|
||||||
assert(sym != 0);
|
assert(sym != 0);
|
||||||
if (bindings != NULL) {
|
if (bindings != NULL) {
|
||||||
const struct key_binding binding = {
|
const struct key_binding binding = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue