don't accept non-letter keys for shortcuts, they can't be shortcuts anyways and it was mis-matching
This commit is contained in:
parent
e9d815173f
commit
a223fa2057
1 changed files with 3 additions and 0 deletions
|
@ -1249,6 +1249,9 @@ static void event_handle_menu_shortcut(XEvent *ev)
|
|||
const char *key;
|
||||
if ((key = translate_keycode(ev->xkey.keycode)) == NULL)
|
||||
return;
|
||||
/* don't accept keys that aren't a single letter, like "space" */
|
||||
if (key[1] != '\0')
|
||||
return;
|
||||
unikey = g_utf8_get_char_validated(key, -1);
|
||||
if (unikey == (gunichar)-1 || unikey == (gunichar)-2 || unikey == 0)
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue