Fixed none working keybindings with a 1.
authorDaniel Carl <danielcarl@gmx.de>
Sun, 10 Feb 2013 16:43:31 +0000 (17:43 +0100)
committerDaniel Carl <danielcarl@gmx.de>
Sun, 10 Feb 2013 16:43:31 +0000 (17:43 +0100)
If a keybind contained a 1 this was only checked if it where uppercase, and
the shift mask was added to the keybinding. Indeed the 1 is uppercase and
lowercase together, so we ignore such cases where the char is available in
both cases.

src/keybind.c

index dcd06eb..dae1651 100644 (file)
@@ -206,7 +206,10 @@ static void keybind_str_to_keybind(gchar* str, Keybind* keybind)
 
     /* set the shift mask for uppercase keys like 'G' */
     guint32 ukval = gdk_keyval_to_unicode(keybind->keyval);
-    if (g_unichar_isgraph(ukval) && gdk_keyval_is_upper(keybind->keyval)) {
+    if (g_unichar_isgraph(ukval)
+        /* ignore SHIFT if key is not subject to case */
+        && (gdk_keyval_is_upper(keybind->keyval) && !gdk_keyval_is_lower(keybind->keyval))
+    ) {
         keybind->modmask = GDK_SHIFT_MASK;
     }