Bug 423080 - Impossible to use tab as custom shortcut anymore
Summary: Impossible to use tab as custom shortcut anymore
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_keys (show other bugs)
Version: unspecified
Platform: Neon Linux
: VHI normal (vote)
Target Milestone: ---
Assignee: Michael Jansen
URL:
Keywords: regression
: 423399 423581 424947 427125 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-06-17 03:32 UTC by Daffa Mumtaz
Modified: 2020-09-30 01:27 UTC (History)
11 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.75


Attachments
Screenshot of custom shortcut with tab (16.26 KB, image/png)
2020-06-22 15:03 UTC, Oussema Bouaneni
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daffa Mumtaz 2020-06-17 03:32:14 UTC
SUMMARY
Pressing tab would switch the focus to default shortcut checkbox or cancel button

STEPS TO REPRODUCE
1. Open the shortcut to change
2. Click Add custom shortcut
3. Enter shortcut combination with tab (e.g. Meta+Ctrl+Tab)

OBSERVED RESULT
The focus switched to the cancel button

EXPECTED RESULT
Tab is recognized as part of the shortcut

SOFTWARE/OS VERSIONS
KDE Plasma Version: 5.19.0
KDE Frameworks Version: 5.70.0
Qt Version: 5.14.2
Comment 1 Mufeed Ali 2020-06-19 07:07:59 UTC
I can confirm that this issue exists.
Comment 2 Oussema Bouaneni 2020-06-22 15:03:10 UTC
Created attachment 129584 [details]
Screenshot of custom shortcut with tab
Comment 3 Oussema Bouaneni 2020-06-22 15:05:08 UTC
I'm not able to reproduce this issue on my machine. I have attached a screenshot in the previous comment. Maybe it's a regression?

Here's my system information if it helps:

Operating System: Manjaro Linux 
KDE Plasma Version: 5.18.5
KDE Frameworks Version: 5.70.0
Qt Version: 5.15.0
Comment 4 Daffa Mumtaz 2020-06-23 03:11:49 UTC
(In reply to Oussema Bouaneni from comment #3)
> I'm not able to reproduce this issue on my machine. I have attached a
> screenshot in the previous comment. Maybe it's a regression?
> 
> Here's my system information if it helps:
> 
> Operating System: Manjaro Linux 
> KDE Plasma Version: 5.18.5
> KDE Frameworks Version: 5.70.0
> Qt Version: 5.15.0

Yes it's a regression to the new Global Shortcuts UI in 5.19
Comment 5 Nate Graham 2020-06-23 16:01:10 UTC
*** Bug 423399 has been marked as a duplicate of this bug. ***
Comment 6 Nate Graham 2020-07-02 01:34:49 UTC
*** Bug 423581 has been marked as a duplicate of this bug. ***
Comment 7 Alexander Lohnau 2020-09-05 10:22:31 UTC
To give you a workaround: It works with kmenuedit
Comment 8 Daffa Mumtaz 2020-09-05 10:33:16 UTC
(In reply to Alexander Lohnau from comment #7)
> To give you a workaround: It works with kmenuedit

How exactly do I change KWin > Switch to Next Desktop shortcut to Meta + Tab from kmenuedit?
Comment 9 Alexander Lohnau 2020-09-05 10:55:36 UTC
Application shortcuts are also affected by this bug and for that kmenuedit works as a perfect workaround (should have maybe been more clear about that).

But you could just manually edit the ~/.config/kglobalshortcutsrc file and go to the  the "[kwin]" group and edit/add the following entry:

Switch to Next Desktop=Meta+Ctrl+Tab,none,Switch to Next Desktop

And then logging in and out to restart the affected apps. It works great for me :)
Comment 10 Alexander Lohnau 2020-09-05 12:58:56 UTC
Application shortcuts are also affected by this bug and for that kmenuedit works as a perfect workaround (should have maybe been more clear about that).

But you could just manually edit the ~/.config/kglobalshortcutsrc file and go to the  the "[kwin]" group and edit/add the following entry:

Switch to Next Desktop=Meta+Ctrl+Tab,none,Switch to Next Desktop

And then logging in and out to restart the affected apps. It works great for me :)
Comment 11 Alexander Lohnau 2020-09-05 13:39:34 UTC
That is because the new Global Shortcuts UI uses QML. The old QWidgets one had an extra case to prevent the focus loss with tab/backtab: https://invent.kde.org/frameworks/kxmlgui/-/blob/master/src/kkeysequencewidget.cpp#L675

But I don't know how to implement this behavior in QML.
Comment 12 David Redondo 2020-09-05 15:59:03 UTC
With gammaray we coudl maybe check what gets the tab event. Maybe the kcm can install an eventfilter or something
Comment 13 Alexander Lohnau 2020-09-11 19:57:03 UTC
*** Bug 424947 has been marked as a duplicate of this bug. ***
Comment 14 David Redondo 2020-09-15 08:08:25 UTC
Moving back to the kcm, the keysequenceitems in plasmoid shortcut settings are not affected. I think it may have something to do with qquickwidget because it also works correctly with plasma-settings.
Comment 15 David Redondo 2020-09-18 09:33:04 UTC
Git commit 8ac50dd36e5a9d33ffdb5e3ca4fcf67516263da9 by David Redondo.
Committed on 18/09/2020 at 09:11.
Pushed by davidre into branch 'master'.

Remove handling for inside events from tab hack

The hack broke KeySequenceItem. I tried removing it entirely with
"activeFocus:true" of the root item but from my testing we still need this
reduced hack to go outside of the qquickwidget while tabbing around.

M  +14   -41   src/kcmoduleqml.cpp

https://invent.kde.org/frameworks/kcmutils/commit/8ac50dd36e5a9d33ffdb5e3ca4fcf67516263da9
Comment 16 Patrick Silva 2020-09-30 01:26:30 UTC
*** Bug 427125 has been marked as a duplicate of this bug. ***