Bug 174142

Summary: Alt-Tab menu cannot use Alt-Shift-Tab for going back through the list of windows?
Product: [Plasma] kwin Reporter: Joe Biden <mailinglist>
Component: generalAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: andreas, domasj, gekylafas, info, jan.rauberg, KaiUweBroulik2, kdebugzilla, mh, mystra.x64, oleynikovny, philschmidt, phrh, random.linux.user, scarpa.alberto, tftfmacedo, wengxt, zegenie
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:

Description Joe Biden 2008-11-03 03:56:29 UTC
Version:           unknown (using 4.1.2 (KDE 4.1.2), Kubuntu packages)
Compiler:          cc
OS:                Linux (i686) release 2.6.27-4-generic

Shift-Alt-Tab, even when set for going backwards through the Window list doesn't seem to...work.
Comment 1 Tiago Macedo 2008-11-05 22:11:33 UTC
I have this problem as well.

4.1.2 on gentoo - I'll gladly provide more information if needed.
Comment 2 CW West 2008-11-28 17:34:59 UTC
Me too on 4.1.3. KDE has nice switchers but not being able to go backwards kills the fun.  It would be nice if after alt-tab (with the alt key held down), the mouse wheel up/down could be used to browse the windows.  Perhaps this is related to other input bugs such as khotkeys.   
Comment 3 Tiago Macedo 2008-12-08 12:13:07 UTC
I fixed this in my system by changing the xorg.conf - my keyboard layout and variants weren't correct
Comment 4 Domas Jokubauskis 2009-05-22 22:00:17 UTC
KDE 4.2.2:
Alt-Tab works as well as Shift-Alt-Tab. This should be marked as CLOSED/FIXED.
Comment 5 Martin Flöser 2009-05-25 10:22:35 UTC
*** Bug 184764 has been marked as a duplicate of this bug. ***
Comment 6 Jan Rauberg 2009-05-25 10:54:04 UTC
I have the same bug in KDE 4.2.3 (KWin 4.2.2). Alt-Tab works but Shift-Meta-Tab fails. The Meta-Tab is the left 'windows'-key.
Comment 7 Martin Flöser 2009-05-25 18:04:38 UTC
*** Bug 194046 has been marked as a duplicate of this bug. ***
Comment 8 Philipp Schmidt 2009-06-06 15:27:23 UTC
*** This bug has been confirmed by popular vote. ***
Comment 9 Philipp Schmidt 2009-06-06 15:30:08 UTC
I have the same Problem using Ubuntu with KDE 4.2.2 through 4.2.4.
Comment 10 Matthias Heinz 2009-06-06 16:34:15 UTC
Hi,

as I mentioned in https://bugs.kde.org/show_bug.cgi?id=159063 this could be a problem how the "shift" key is translated for Qt. There's Qt::Key_Shift and Qt::SHIFT, one is a modifer the other a key.

SHIFT works fine, but I couldn't get to work Key_Shift in any of my Qt programs.
Comment 11 Patrick Horn 2009-07-18 09:04:23 UTC
I'm using Kwin 4.2.2, and I noticed this bug and wasted an hour inside "kcmshell4 keys" messing with Alt+Backtab, Alt+Shift+Backtab, Meta+Tab, etc. each shortcut causing its own problems.

Then, I tried setting them back to the defaults: Alt+Tab for forward and Alt+Shift+Backtab for reverse, (*NOT* Alt+Backtab which it produces when you press the key yourself).  After this, I ran "kwin --replace &"... and lo and behold, forwards and backwards works like a charm.

I think the three problems are:

- Changing a Window Switcher shortcut inside of "kcmshell4 keys" causes some sort of inconsistent state inside KWin, so you have to restart it for the shortcuts to update properly throughout.

- Pressing "Alt+Shift+Tab" into the keybinding box shows up as Alt+Backtab, which is incorrect--it should be Alt+Shift+Backtab in order for the shortcut to work!

Note that this occurs for any Tab/Shift+Tab based bindings you want -- so the Shift/Backtab deal is the real issue to deal with. For example, I cannot use Meta for window switching as long as I am unable to input Meta+Shift+Backtab into the box (aside from hand-editing some config file).

- This was the bug that prompted me to change key shortcuts in the first place, so there might be something wrong with the defaults. On the other hand, it is possible that I had changed the keybindings a few months ago and forgot, maybe when I was using KDE 4.1 or KDE 3.
Comment 12 Christoph Feck 2009-07-18 13:30:12 UTC
http://websvn.kde.org/?view=rev&revision=996212 might be interesting, not sure if it has been backported to 4.3 branch.
Comment 13 Troy 2009-08-07 22:04:37 UTC
KDE 4.3.0

Based on comment #12 I had hoped this would be fixed in 4.3. Unfortunately it appears the problem is still there. Also exports seem to fail using kcmshell4 in KDE 4.3.
Comment 14 Matthias Heinz 2009-08-07 22:25:40 UTC
Sad but true and very annoying (and one reason why i keep using 3.5 on my laptop)

The funny thing is: The standard config of Debian is Alt+Shift+Backtab, but cycling backwards through the window list didn't work out of the box.

Please try the following: Set a combination for going backwards through the list, accept it and then switch back to default. Worked for me, but just because its the default configuration.
Comment 15 Troy 2009-08-07 22:41:29 UTC
Matthias: I tried that but in Kubuntu the default is None so it just went back to not being assigned. For what it's worth alt+shift+Tab didn't work anyway. I edited:

~/.kde/share/config/kglobalshortcutsrc

and made the config line for Walk Through Desktop List (Reverse) read:

Walk Through Desktop List (Reverse)=Ctrl+Shift+Backtab,none,Walk Through Desktop List (Reverse)

and it works! I'm pretty sure that's what Patrick was referring to in comment #11 but I couldn't find the file to edit until now. Whew. I was almost forced to switch to gnome there.
Comment 16 Matthias Heinz 2009-08-09 18:52:34 UTC
Do you know which part of kde causes this error? I'd like to find fix this problem for now and forever.

The problem is that Meta+Shift+Tab doesn't work either and I use this combination to go backwards through the list of desktops.
Comment 17 Andreas Pakulat 2009-08-09 19:07:22 UTC
(In reply to comment #16)
> Do you know which part of kde causes this error? I'd like to find fix this
> problem for now and forever.
> 
> The problem is that Meta+Shift+Tab doesn't work either and I use this
> combination to go backwards through the list of desktops.

I think the problem with Shift+<somekey> is a problem in Qt, however I haven't seen any problems since months now (I'm using KDE 4.3 since 4.2 was released) here.

My systemsettings show me "Alt+Shift+Backtab" for going backwards through the list and thats also the default as far as I can see.

The relevant code for this is in Qt's QAction/QKeySequence/QShortcut and probably some of the kernel classes (like QApplication etc) as well as KDE's global shortcuts daemon which covers the global-X11-keyboard-stuff (thats in kdebase/runtime and kdelibs/kdeui)
Comment 18 Matthias Heinz 2009-08-09 19:55:07 UTC
The weird thing is that the default shortcuts do always work. There's just a problem with those you set yourself.

And yes, I did a bit of research a while ago, it looks like the kde applications recognise shift as a key, not as a combination. Qt differs here.
Comment 19 Matthias Heinz 2009-08-09 19:56:01 UTC
replace "combination" with "modifier"...
Comment 20 Martin Flöser 2009-09-02 13:16:02 UTC
*** Bug 205982 has been marked as a duplicate of this bug. ***
Comment 21 FiNeX 2009-09-03 14:28:49 UTC
*** Bug 206111 has been marked as a duplicate of this bug. ***
Comment 22 Matthias Heinz 2010-04-15 19:31:35 UTC
Afaik this bug is fixed.

Can we close it?
Comment 23 Tenno Seremel 2010-05-19 21:23:35 UTC
Still happens to me with 4.4.3 or was it fixed in 4.5?
Comment 24 Philipp Schmidt 2010-05-19 22:20:21 UTC
(In reply to comment #23)
> Still happens to me with 4.4.3 or was it fixed in 4.5?
It was fixed in 4.4 for me and still works like a charm here on my Archlinux with KDE SC 4.4.3.
Comment 25 Tenno Seremel 2010-05-19 22:54:17 UTC
Weird. Meta + shift + tab does not work for me either while meta + tab works. Could it be Debian specific bug, hm...
Comment 26 Matthias Heinz 2010-05-19 23:12:01 UTC
Hi,

I'm using Debian Unstable and its KDE 4.4.3 packages. Meta+Shift+Tab works like a charm for switching desktops backwards, here.


could you move your .kde directory to a safe place and try with a fresh config if this problem still exists then?
Comment 27 Tenno Seremel 2010-05-19 23:42:38 UTC
I got it. By default it works. However if you manually configure it when pressing alt + shift + tab it inserts "alt + shift + tab" literally. While by default it is "alt + shift + backtab". Backtab works, while Tab does not. Don't quite sure why it does so, it worked some KDE4 versions ago AFAIR.
Comment 28 Christoph Feck 2010-08-12 18:43:47 UTC
*** Bug 247535 has been marked as a duplicate of this bug. ***
Comment 29 Christoph Feck 2010-09-02 03:25:09 UTC
*** Bug 249815 has been marked as a duplicate of this bug. ***
Comment 30 Kai Uwe Broulik 2010-09-02 03:37:26 UTC
In KDE 4.5 Alt+Shift+Tab gets converted to.. Alt+Shift+Tab and it still does not work.
Comment 31 random.linux.user 2011-04-28 13:19:01 UTC
Still open in KDE 4.6 (openSUSE 11.4)
Manually editing the kglobalshortcutsrc and changing Shift+Tab to Shift+Backtab works.
Comment 32 Simon Persson 2011-06-29 04:14:11 UTC
Git commit 6026c3a32056bdbae6964e25abf712870edf5aac by Simon Persson.
Committed on 29/06/2011 at 05:10.
Pushed by persson into branch 'master'.

Make global shortcuts involving shift+tab work

When entering (ctrl,alt,meta)+shift+tab as a new shortcut
KKeySequenceWidget gets "backtab" as the key pressed but records "tab".
kglobalaccel gets the keypress event as "backtab" which is correct but
only triggers shortcuts with "backtab" in them and such shortcuts are
not possible for the user to enter.

This commit makes kglobalaccel look for both tab and backtab when
triggered, same as Qt does. By triggering on both it also avoids
breaking peoples alt+shift+tab on upgrade.

BUG: 174142
BUG: 258467
BUG: 261296
BUG: 274006
CCMAIL: kde@michael-jansen.biz
REVIEW: 101523

M  +19   -2    kglobalaccel/globalshortcutcontext.cpp     

http://commits.kde.org/kde-runtime/6026c3a32056bdbae6964e25abf712870edf5aac