[Xfce-bugs] [Bug 8744] [PATCH] Keyboard shortcuts: <Shift> modifier not recognized correctly

bugzilla-daemon at xfce.org bugzilla-daemon at xfce.org
Fri May 4 22:59:14 CEST 2012


https://bugzilla.xfce.org/show_bug.cgi?id=8744

Harald Judt <h.judt at gmx.at> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|                            |http://mail.gnome.org/archi
                   |                            |ves/gtk-app-devel-list/2007
                   |                            |-August/msg00053.html
            Summary|Keyboard shortcuts: <Shift> |[PATCH] Keyboard shortcuts:
                   |modifier not recognized     |<Shift> modifier not
                   |correctly                   |recognized correctly

--- Comment #4 from Harald Judt <h.judt at gmx.at> ---
I've moved this to libxfce4ui, as the settings manager doesn't have anything to
do with it. I was able to track this issue down to the key grabbing process in
both the shortcuts dialog and the shortcuts grabber, and I could restore the
functionality of the shift key as a modifier.

I'm not quite sure my method here is the right one, or if there actually is a
correct method. The problem is this:

1) The shift modifier is being consumed when not used as a single key (aka
Shift_L or Shift_R).
2) While it should then be restored by applying the consumed modifiers (and I'm
not sure it is being properly restored), it seems gtk_accelerator_name does not
return the correct shortcut name.
  Example where gtk_accelerator_name returns the correct value: <Shift>1
becomes Exclam
  Example where gtk_accelerator_name fails: <Shift>a should become A, but
becomes a
3) Additionally, there is a problem with the values returned by
gtk_accelerator_name and gtk_parse_accelerator. See
http://mail.gnome.org/archives/gtk-app-devel-list/2007-August/msg00053.html for
example code.

My patches try to work around these issues:
1) They restore the GDK_SHIFT_MASK in the shortcut dialog and the shortcut
grabber when Shift is detected in both the state and the consumed variables.
2) They reparse the accelerator name to get consistent key values.

I did not notice any negative effects caused by these patches. However, I did
only test the application shortcut functionality. Since this is a core library,
xfwm4 and other applications using libxfce4ui could be affected too. This
should be relatively easy to test, though.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Xfce-bugs mailing list