Bug 197548

Summary: Shortcut combinations with shift-key don't work
Product: [Unmaintained] kdelibs Reporter: Micah Abresch <abresch>
Component: shortcutsAssignee: kdelibs bugs <kdelibs-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: andresbajotierra, biby, dpfrey, kemiles_alt1, marcan
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Ubuntu   
OS: Unspecified   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Micah Abresch 2009-06-22 22:01:01 UTC
Version:            (using KDE 4.2.4)
Installed from:    Ubuntu Packages

Any shortcut key combination in which the shift-key changes the key to something else fails. For example, Meta++ does not work, because that is meta+shift+=. Similarly, no hotkeys using the num-pad work.
Comment 1 Dario Andres 2009-06-24 19:51:07 UTC
Do you experience this issue if you assign the same shortcut in any other application ? (my question is: is this a KWin-related thing, or related to kdelibs instead) ?
Thanks
Comment 2 Micah Abresch 2009-06-24 20:01:22 UTC
I did some more testing. It does not happen with regular shortcuts, but it happens in every program with global shortcuts. However, it does not happen in pre-KDE4 apps (I tested Amarok 1.4 as I still use it) for their global shortcuts.

I hope that information is enough to clarify where the bug is.
Comment 3 Hector Martin 2009-10-11 03:16:54 UTC
I get this for some keys. For example. Shift+HomePage isn't recognized (the shortcut picker just picks up HomePage, although it does get the "Shift+" temporary text while I hold shift down). Shift+Fxx works, Shift+Media Next doesn't. Shift+AudioForward works and so does Shift+Wireless. Shift+Launch Mail doesn't.
Comment 4 Ken Miles 2009-11-19 17:06:55 UTC
I note that this is still "unconfirmed" after four months.  I have experienced this problem in 4.3.3 on SuSE 11.1 and 4.3.2 on FC10.  To duplicate try:  Global Keyboard Shortcuts / KWIN / Window to Desktop 2 / Custom / Alt+Shift+2 / Apply.  The sequence is shown as "Alt+@", but entering this sequence on the keyboard is ignored.

I have noted that kglobalshortcutsrc records predefined shortcuts involving the shift key with the word "+Shift" while shortcuts entered interactively are recorded without this keyword, but rather as "Alt+@" etc.  I tried export / edit "insert +Shift string" / import but this did not help.  A snippet from the imported shortcutsrc is below with "Switch to Desktops 1-4" edited in this way and "Switch to 5,6" unchanged.  It doesn't help.  All six shortcuts are ignored.

Snippet from export of schema:

[kwin][Global Shortcuts]
    [ ... ]
Window to Desktop 1=Alt+Shift+1
Window to Desktop 2=Alt+Shift+2
Window to Desktop 3=Alt+Shift+3
Window to Desktop 4=Alt+Shift+4
Window to Desktop 5=Alt+%
Window to Desktop 6=Alt+^
    [ ... ]
Comment 5 Christoph Feck 2010-05-28 12:50:59 UTC
*** Bug 239036 has been marked as a duplicate of this bug. ***
Comment 6 David Frey 2010-07-05 03:37:13 UTC
It has been over a year since this bug was reported and four different people have confirmed that it exists.  Why is it listed as "uncomfirmed"?  Is there anything I can do to help move this along?
Comment 7 Christoph Feck 2010-09-02 03:17:52 UTC
Yes, provide a patch.
Comment 8 Martin Flöser 2011-03-19 10:13:27 UTC
*** Bug 173247 has been marked as a duplicate of this bug. ***
Comment 9 Simon Persson 2011-06-29 04:14:11 UTC
Git commit 568cb9268a3f940564d155526cb81cec4327cbf6 by Simon Persson.
Committed on 29/06/2011 at 04:56.
Pushed by persson into branch 'master'.

Fix global shortcuts that include symbols produced with shift key

KKeySequenceWidget (used to enter shortcuts) removes shift from the
recorded shortcut if the symbol produced from that key is different
when shift is used. kglobalaccel needs to include shift in the grab in
order to be triggered on this class of shortcuts, and then in the
keypress event handler it also needs to strip the shift again before
checking which shortcut was just triggered.
BUG: 179504
BUG: 197548
BUG: 215030
CCMAIL: kde@michael-jansen.biz
REVIEW: 101520

M  +23   -3    kglobalaccel/kglobalaccel_x11.cpp     

http://commits.kde.org/kde-runtime/568cb9268a3f940564d155526cb81cec4327cbf6