Bug 438991

Summary: Setting a task switcher shortcut involving shift+tab (backtab) isn't working continuously
Product: [Applications] systemsettings Reporter: Schlaefer <openmail+kde>
Component: kcm_kwintabboxAssignee: fanzhuyifan
Status: RESOLVED FIXED    
Severity: normal CC: achilleas.k, CoelacanthusHex, fanzhuyifan, gabriel.cannabrava, long, nate, plasma-bugs, rafael.linux.user, roczech+kdebugs, traviswjacobs, unblended_icing552
Priority: NOR Keywords: usability
Version: 5.90.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=422713
https://bugs.kde.org/show_bug.cgi?id=296879
https://bugs.kde.org/show_bug.cgi?id=479807
Latest Commit: Version Fixed In: 6.0

Description Schlaefer 2021-06-21 12:37:49 UTC
SUMMARY

Setting a task switcher shortcut involving "Shift+Tab" (usually used for moving reverse order) doesn't allow repeated reverse movement.

STEPS TO REPRODUCE
1. Go to Settings -> Task Switcher
2. Set an "Reverse" by holding e.g. Meta + Shift + Tab keys.
3. Now hold "Meta+Shift" and hit "Tab" once to go reverse one window
4. While still holding "Meta+Shift" hit Tab another time to reverse to another window

OBSERVED RESULT

Only the first "Tab" is recognized going back one window. All "Tab" hits after that show no effect.

EXPECTED RESULT

Holding "Meta+Shift" and hitting "Tab" repeatedly should traverse through multiple windows in reverse order.


SOFTWARE/OS VERSIONS
Operating System: EndeavourOS
KDE Plasma Version: 5.22.1
KDE Frameworks Version: 5.83.0
Qt Version: 5.15.2
Kernel Version: 5.12.12-zen1-1-zen (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i7-4790 CPU @ 3.60GHz
Memory: 23,4 GiB of RAM
Graphics Processor: Radeon RX 5500 XT

ADDITIONAL INFORMATION

Setting the shortcut writes a "Meta+Shift+Tab" into `~/.config/kglobalshortcutsrc`, which as laid out above doesn't work. Changing it manually to "Meta+Shift+Backtab" does work. So it seems that writing "Tab" instead of "Backtap" into kglobalshortcutsrc is part of the problem.

This behavior is also shown when setting a shortcut via "Global Shortcuts".
Comment 1 Nate Graham 2022-06-14 17:55:40 UTC
*** Bug 455236 has been marked as a duplicate of this bug. ***
Comment 2 fanzhuyifan 2023-12-15 07:28:21 UTC
*** Bug 478526 has been marked as a duplicate of this bug. ***
Comment 3 fanzhuyifan 2023-12-15 07:29:52 UTC
422713 and 296879 are also possible duplicates
Comment 4 fanzhuyifan 2023-12-15 07:30:50 UTC
Can reproduce (on wayland, the report for 478526 was also on wayland).

Steps to reproduce:
1. Go to settings -> shortcuts -> kwin
2. Find walk through windows reverse
3. assign Alt+Shift+Tab as shortcut

Observed behavior:
Alt+Shift+Tab does not work.

So if you manually edit .config/kglobalshortcutsrc and change Tab to Backtab, then it works again.
Comment 5 Bug Janitor Service 2023-12-16 07:46:09 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/4798
Comment 6 fanzhuyifan 2023-12-16 07:48:01 UTC
*** Bug 296879 has been marked as a duplicate of this bug. ***
Comment 7 fanzhuyifan 2023-12-18 21:24:51 UTC
Git commit b6d864b793eb237c22e8ef659beabfe01d889134 by Yifan Zhu.
Committed on 18/12/2023 at 22:22.
Pushed by fanzhuyifan into branch 'tab'.

tabbox: match Shift+Backtab against Shift+Tab

When users simultaneously press Shift and Tab, the keys are sometimes
registered as Shift+Tab, and sometimes as Shift+Backtab.
So we need to match received Shift+Tab against shortcuts containing
Shift+Backtab, and vice versa. Previously the code only checks for
the first case. This commit adds checks for the second case.
FIXED-IN: 6.0

M  +6    -5    src/tabbox/tabbox.cpp

https://invent.kde.org/plasma/kwin/-/commit/b6d864b793eb237c22e8ef659beabfe01d889134
Comment 8 fanzhuyifan 2023-12-18 21:30:07 UTC
Committed to wrong branch, not merged to master yet
Comment 9 Vlad Zahorodnii 2023-12-19 10:30:12 UTC
Git commit bc73e14e68f43943b1ba190389ba35f78d7e6566 by Vlad Zahorodnii, on behalf of Yifan Zhu.
Committed on 19/12/2023 at 11:00.
Pushed by vladz into branch 'master'.

tabbox: match Shift+Backtab against Shift+Tab

When users simultaneously press Shift and Tab, the keys are sometimes
registered as Shift+Tab, and sometimes as Shift+Backtab.
So we need to match received Shift+Tab against shortcuts containing
Shift+Backtab, and vice versa. Previously the code only checks for
the first case. This commit adds checks for the second case.
FIXED-IN: 6.0

M  +6    -5    src/tabbox/tabbox.cpp

https://invent.kde.org/plasma/kwin/-/commit/bc73e14e68f43943b1ba190389ba35f78d7e6566
Comment 10 fanzhuyifan 2023-12-25 05:36:54 UTC
*** Bug 478983 has been marked as a duplicate of this bug. ***
Comment 11 Zamundaaa 2024-02-21 13:33:29 UTC
Git commit c8b7717953a28ac43f1fa5e69c9eceae4ea7e868 by Xaver Hugl, on behalf of Yifan Zhu.
Committed on 21/02/2024 at 13:19.
Pushed by zamundaaa into branch 'Plasma/5.27'.

tabbox: match Shift+Backtab against Shift+Tab

When users simultaneously press Shift and Tab, the keys are sometimes
registered as Shift+Tab, and sometimes as Shift+Backtab.
So we need to match received Shift+Tab against shortcuts containing
Shift+Backtab, and vice versa. Previously the code only checks for
the first case. This commit adds checks for the second case.
FIXED-IN: 6.0


(cherry picked from commit bc73e14e68f43943b1ba190389ba35f78d7e6566)

M  +6    -5    src/tabbox/tabbox.cpp

https://invent.kde.org/plasma/kwin/-/commit/c8b7717953a28ac43f1fa5e69c9eceae4ea7e868