GNOME Bugzilla – Bug 536581
Handle consumed shift state
Last modified: 2008-06-13 16:46:23 UTC
Currently, if a keybinding uses the Shift modifier, but it would be consumed by resolving the keysym, we need to remove it from the consumed modifiers, otherwise the matching would fail. The test case is using "Alt+Shift+>" as a shortcut for one of the builtin keybindings.
Created attachment 112116 [details] [review] Handle shift being needed for the consumption.
+ consumed = ~consumed & GDK_SHIFT_MASK; Did you mean consumed &= ~GDK_SHIFT_MASK? Also, can we please not use g_print? I'd prefer not adding all that debug dump stuff in the first place.
(In reply to comment #2) > + consumed = ~consumed & GDK_SHIFT_MASK; > > Did you mean consumed &= ~GDK_SHIFT_MASK? That should work too. > Also, can we please not use g_print? I'd prefer not adding all that debug dump > stuff in the first place. It's not called anywhere by default, and it's useful for debugging.
(In reply to comment #3) > (In reply to comment #2) > > + consumed = ~consumed & GDK_SHIFT_MASK; > > > > Did you mean consumed &= ~GDK_SHIFT_MASK? > > That should work too. It's a fundamentally different result, though... > > Also, can we please not use g_print? I'd prefer not adding all that debug dump > > stuff in the first place. > > It's not called anywhere by default, and it's useful for debugging. g_debug is even better for debugging, and I dislike debugging functions appearing in "public" api.
Committed the fix.