From 25c210b851c2d9a412bbb4c6a518f136c5a6d3a0 Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Sun, 23 Oct 2016 13:08:52 +0200 Subject: [PATCH] Fix: #485 Remove used modifiers before figuring out keybinding. --- source/view.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/view.c b/source/view.c index 30a6da146..733c1420b 100644 --- a/source/view.c +++ b/source/view.c @@ -1189,8 +1189,10 @@ static void rofi_view_handle_keypress ( RofiViewState *state, xkb_stuff *xkb, xc len = xkb_state_key_get_utf8 ( xkb->state, xkpe->detail, pad, sizeof ( pad ) ); } - unsigned int modstate = x11_canonalize_mask ( xkpe->state ); + xkb_mod_mask_t mod = xkb_state_serialize_mods ( xkb->state, XKB_STATE_MODS_EFFECTIVE ); + xkb_mod_mask_t rrstate = xkb_state_mod_mask_remove_consumed ( xkb->state, key,mod ); + unsigned int modstate = x11_canonalize_mask ( rrstate ); if ( key != XKB_KEY_NoSymbol ) { KeyBindingAction action; action = abe_find_action ( modstate, key );