Bug 153211 - Keyboard didn't respond anymore after I press Alt+Shift+Tab
Summary: Keyboard didn't respond anymore after I press Alt+Shift+Tab
Status: RESOLVED FIXED
Alias: None
Product: kdelibs
Classification: Frameworks and Libraries
Component: kdeui (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: VHI grave
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
: 153495 153754 154692 156069 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-12-01 13:53 UTC by Josep Febrer
Modified: 2009-02-12 10:52 UTC (History)
10 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Josep Febrer 2007-12-01 13:53:43 UTC
Version:           3.96.1 (using KDE Devel)
Installed from:    Compiled sources
OS:                Linux

While using Alt+Tab for switching between applications works fine in my KDE4 post RC1 version, when I try to use Alt+Shift+Tab shortcut the keyboard did not respond anymore and I don't know how to get it back.
However the mouse it is still working properlly, so I can logout with the mouse and I when I log back the keyboard it also works.
Comment 1 Andreas Pakulat 2007-12-05 17:41:05 UTC
I just hit this bug as well. But unfortunately I can't re-trigger it at the moment. While alt-shift-tab doesn't do anything here, the keyboard is still accessible.
Comment 2 Andreas Pakulat 2007-12-05 22:28:30 UTC
This is really a serious problem. It seems that if I hit Alt+Shift+tab directly I always get the problem. And if I just hit Alt+Tab and then Alt+Shift+tab and release I get it as well, so I have to make sure I always hit Alt+Tab as last thing.
Comment 3 Matt Williams 2007-12-06 23:06:22 UTC
In KDE 3, Alt+Shift+Tab is one of the possible shortcuts used for switching keyboard layouts (keyboard layout kcm -> xkb options -> layout switching tree item). Even though I don't have that box ticked, it still persists in changing the layout with that shortcut. Perhaps, the shortcut is being sent to the same place but is causing a crash due to some bitrot?
Comment 4 Andreas Pakulat 2007-12-06 23:46:31 UTC
While editing kglobalaccelsrc to change the shortcut does help, killing kxkb doesn't help at all and thus I don't think its kxkb causing the problem.
Comment 5 Andreas Pakulat 2007-12-06 23:47:54 UTC
*** Bug 153495 has been marked as a duplicate of this bug. ***
Comment 6 Gaël de Chalendar (aka Kleag) 2007-12-07 00:18:11 UTC
I confirm. I had to reboot. 
Note that the mouse was behaving has if the Shift key was pressed: it was extending the selection when clicking with the left button. 
Comment 7 Andreas Pakulat 2007-12-08 20:23:44 UTC
The problem is in KGlobalAccel, it doesn't release the grab when a shortcut is set that isn't triggered. Which is the case for Alt+Shift+Tab, the shortcut that is actually send by X11 is Alt+Shift+Backtab. Re-Assigning.
Comment 8 Matt Williams 2007-12-09 23:24:50 UTC
*** Bug 153754 has been marked as a duplicate of this bug. ***
Comment 9 Andreas Pakulat 2007-12-11 11:27:41 UTC
SVN commit 747205 by apaku:

Add a hotfix for Bug #153211, also ungrab the keyboard when Alt+Shift+Backtab was hit
CCBUG:153211


 M  +5 -1      kglobalaccel_x11.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=747205
Comment 10 Josep Febrer 2007-12-12 11:20:13 UTC
Thanks, your hotfix fixed this problem, however on the past KrushDay someone mentioned a similar issue pressing Alt+PrintScr which is still present for me. I don't know if this is related with the original issue, but if not you can close this bug.
Comment 11 Andreas Pakulat 2007-12-12 12:03:33 UTC
It could be, I'll check later today. IIRC Alt+Print Screen is some snapshot function right? You can easily check wether its the same issue by doing the following:

Open $HOME/.kde4/share/config/kglobalshortcutsrc and find the action there. Then open any shortcut dialog in any application and change one of the shortcuts. When you're asked for pressing the new keyboard combination press the Alt+Print keys and check wether the label of the shortcut button is now the same as that in the rc-file. If they differ its the same problem and that means we need a different fix for this problem, than the hotfix I comitted.
Comment 12 Josep Febrer 2007-12-12 13:48:56 UTC
In kglobalshortcutsrc I have assigned Alt+Print to kwin, and also Alt+Shift+Tab to kwin. But if in one application like Konqueror or Konsole I assing a new shortcurt to Alt+Print it get's changed automatically to Alt+Shift+Print, so I can't assign another Alt+Print shortcut.
However I can assign Alt+Shift+Tab shortcut, but besides it is still showing it in shortcut settings it doesn't work, and also it doesn't appear in  kglobalshortcutsrc apart from the old one already existing and assigned to kwin.

Also I don't know if is my setup but in 'kcmshell4 keys' I can't modify any shortcut, in fact, it doesn't show any, but that can be another bug.
Comment 13 Andreas Pakulat 2007-12-12 14:02:30 UTC
Ok  as far as I can see this is the same problem, namely that the keys Alt+Print don't produce the X11 keysequence that is expected. In particular Alt+Shift+Tab creates a Qt key sequence of Alt+Shift+Backtab and seemingly Alt+Print creates Alt+Shift+Print in Qt key sequence. So this is indeed the same problem.

Regarding the keys kcm: Thats "expected", the kcm hasn't been properly ported. I've already posted a patch for a minimal port to the kde-core list. That one will get comitted next monday, unless I get objections.
Comment 14 Josep Febrer 2007-12-12 16:21:52 UTC
I discovered another similar shortcut which is Ctrl+PrintScrn but this doesn't suffer this problem and works as expected.
To my knowledge, only Alt+Shift+Print and Alt+Print are triggered by this bug.
Comment 15 Andreas Pakulat 2007-12-29 21:26:29 UTC
*** Bug 154692 has been marked as a duplicate of this bug. ***
Comment 16 Andreas Pakulat 2008-01-18 09:43:38 UTC
*** Bug 156069 has been marked as a duplicate of this bug. ***
Comment 17 Lubos Lunak 2008-01-18 18:27:22 UTC
SVN commit 763132 by lunakl:

Since calling directly Xlib's XGrabKeyboard() is very unlikely
and even probably undesired in kded, make KGlobalAccel again
ungrab when there's no Qt caused grab.
BUG: 153211




 M  +0 -7      kdedglobalaccel.cpp  
 M  +1 -4      kdedglobalaccel.h  
 M  +11 -11    kglobalaccel_x11.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=763132
Comment 18 Andreas Pakulat 2008-01-23 19:38:13 UTC
*** Bug 156434 has been marked as a duplicate of this bug. ***
Comment 19 Mathieu Jobin 2009-01-05 22:47:48 UTC
this bug should still be open. I am running 4.2 beta 2 and this problem is still there.
Comment 20 Mikael Gerdin 2009-02-12 10:52:27 UTC
I've found this bug in KDE 4.2 too. I don't know if there is any specific key-combination that triggers it, but KWin acts as if I'm holding down the ALT-key, moving windows when I click and drag in them.
(Kubuntu 8.10 (intrepid) packages from kubuntu-experimental)