don't accept non-letter keys for shortcuts, they can't be shortcuts anyways and it was mis-matching

This commit is contained in:
Dana Jansens 2007-05-02 00:02:02 +00:00
parent e9d815173f
commit a223fa2057

View file

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