From: Dana Jansens Date: Wed, 2 May 2007 00:02:02 +0000 (+0000) Subject: don't accept non-letter keys for shortcuts, they can't be shortcuts anyways and it... X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=a223fa20579fec9ba731e426b0a28ce983862b6c;p=chaz%2Fopenbox don't accept non-letter keys for shortcuts, they can't be shortcuts anyways and it was mis-matching --- diff --git a/openbox/event.c b/openbox/event.c index 78768a62..5d6b62bb 100644 --- a/openbox/event.c +++ b/openbox/event.c @@ -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;