From 861421b01770c485a971f3a403b1b9163fa5e2be Mon Sep 17 00:00:00 2001 From: Daniel Carl Date: Mon, 5 Aug 2013 21:42:26 +0200 Subject: [PATCH] Fixed none working keybindings with whene x is a modkey. If a keybinding exists with a modekey 'x' no keybinding with 'x' and additional modifiers worked. --- src/keybind.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/keybind.c b/src/keybind.c index 096c3e5..00c7879 100644 --- a/src/keybind.c +++ b/src/keybind.c @@ -254,6 +254,7 @@ static gboolean keypress_cb(WebKitWebView *webview, GdkEventKey *event) return true; } + /* allow mode keys and counts only in normal mode and search mode */ if (vb.state.mode & (VB_MODE_NORMAL|VB_MODE_SEARCH)) { if (vb.state.modkey == 0 && ((keyval >= GDK_1 && keyval <= GDK_9) @@ -264,7 +265,10 @@ static gboolean keypress_cb(WebKitWebView *webview, GdkEventKey *event) return true; } - if (strchr(modkeys->str, keyval) && vb.state.modkey != keyval) { + /* modekeys don't have ctrl or mod modiefiers set */ + if (!CLEAN_STATE(event) + && strchr(modkeys->str, keyval) && vb.state.modkey != keyval + ) { vb.state.modkey = (char)keyval; vb_update_statusbar(); -- 2.20.1