From: Daniel Carl Date: Sun, 10 Feb 2013 16:43:31 +0000 (+0100) Subject: Fixed none working keybindings with a 1. X-Git-Url: https://git.owens.tech/dummy.html/dummy.html/git?a=commitdiff_plain;h=59e597e9fe5858539787e77d50930c73c40ef2ad;p=vimb.git Fixed none working keybindings with a 1. 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. --- diff --git a/src/keybind.c b/src/keybind.c index dcd06eb..dae1651 100644 --- a/src/keybind.c +++ b/src/keybind.c @@ -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; }