Bug 374287 - Support keyboard arrows navigation in the window switcher (Alt + Tab)
Summary: Support keyboard arrows navigation in the window switcher (Alt + Tab)
Status: RESOLVED DUPLICATE of bug 370185
Alias: None
Product: kwin
Classification: Plasma
Component: tabbox (show other bugs)
Version: 5.8.5
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-29 12:37 UTC by Luis Fernando Planella Gonzalez
Modified: 2017-06-19 15:11 UTC (History)
2 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 Luis Fernando Planella Gonzalez 2016-12-29 12:37:21 UTC
It would be nice to support navigating through the windows with arrows on while still keeping Alt pressed.
For example:
1. Press Alt + Tab
2. Release Tab
3. Press left / right / up / down to select another window
4. Release Alt
5. That window is focused

Other DEs support this, and makes navigation much easier, specially to select the previous window, as having to keep Alt, press Shift and then Tab again requires some finger stretching.

As a bonus, specific window switching layouts could override the behavior. For example, the grid switcher could correctly implement up / down. The others could just handle up as an alias of left, and down as an alias of right.
Comment 1 Luis Fernando Planella Gonzalez 2016-12-29 12:42:50 UTC
I just notices that both 3D switchers (Cover and Flip Switch) support key navigation. So this issue applies to the other ones.
Comment 2 Martin Flöser 2016-12-29 13:00:07 UTC
which window switcher are you using? This should be supported by all 
switchers. So it's probably a bug in the one you use.
Comment 3 Luis Fernando Planella Gonzalez 2016-12-29 13:04:25 UTC
I've tested with every single one, and the only ones that support keyboard navigation are the 3D ones.
For example: Breeze, Breeze dark, Grid, Previews, etc - they all ignore the keyboard arrows.
I just have the default ones installed (haven't installed any one through GHNS)
Comment 4 Martin Flöser 2016-12-29 13:20:28 UTC
which cursor keys did you use? E.g. in Breeze (using a vertical list) 
the up/down arrows should be supported. Left/right though should not be 
supported.
Comment 5 Luis Fernando Planella Gonzalez 2016-12-29 17:15:00 UTC
I've tested with all 4 arrow keys.
I can confirm none of them work in any of the non-3D window switchers. Here's what I do:
1. Hold Alt
2. Press (and release) Tab
3. Try any arrow key

Maybe there is some configuration missing?

Maybe something related: If I set the screen edge feature (for example, on the left side) to show the window switcher (for example, Breeze or Grid), any of the arrow keys work either, and when I click a window it just highlights it, but there's no obvious way to select the window and dismiss the switcher. If I choose a 3D switcher, it is worse, because keys then don't work either, neither Enter or ESC, and I have to move the mouse again to that screen edge to dismiss the switcher.
Comment 6 Luis Fernando Planella Gonzalez 2016-12-29 17:22:24 UTC
Just to make sure it wasn't something in my $HOME that was messing, I've created a new user, logged in with it, and the arrow keys don't work either.
Comment 7 Chris Holland 2017-01-19 01:08:08 UTC
I can confirm this doesn't work for me.
KDE Neon 5.8.5 / Framework 5.29 / Qt 5.7.0

It sounds like the QML based tabboxes aren't recieving the keypress events. The flip switch and cover switch are C++ desktop effects, which can hook the keyboard events themselves since they create their own window.

https://github.com/KDE/kwin/blob/master/effects/flipswitch/flipswitch.cpp#L902
https://github.com/KDE/kwin/tree/master/effects/coverswitch

This is where the QML based tabboxes events are handled.

https://github.com/KDE/kwin/blob/master/tabbox/tabboxhandler.cpp#L618

If you do:

PlasmaCore.Dialog {
  mainItem: Item {
    Keys.onPressed: {}
  }
}

then it works in the *preview* but does not work in the actual kwin popup.

I wonder if it's because the popup isn't focused? PlasmaCore.Dialog is a QQuickWindow, which I don't think will do anything if it doesn't contain an activeFocusItem.

https://github.com/qt/qtdeclarative/blob/dev/src/quick/items/qquickwindow.cpp#L1622

Did it work in the past? Did adding the eventFilter to support the mouse wheel break it? I don't remember if it used to work or not.

https://github.com/KDE/kwin/commit/e9d20b80e9a79f514a219357d991092d83665350

I do know that the qml api changed, because a number of task switchers on GHNS no longer work.
Comment 8 Martin Flöser 2017-06-19 15:11:14 UTC

*** This bug has been marked as a duplicate of bug 370185 ***