Bug 425979

Summary: Impossible to assign Alt-based keyboard shortcuts which also trigger buttons in the KCM
Product: [Applications] systemsettings Reporter: Patrick Silva <bugseforuns>
Component: kcm_keysAssignee: Michael Jansen <kde>
Status: RESOLVED FIXED    
Severity: normal CC: ahiemstra, christ.derek, kde, nate, plasma-bugs
Priority: VHI    
Version: unspecified   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed In: 5.75

Description Patrick Silva 2020-08-30 12:43:23 UTC
STEPS TO REPRODUCE
1. open system settings > Shortcuts
2. press alt key and observe the underlined letter of each button of the kcm
3. try to assign alt+<underlined letter of any button> shortcut to anything

OBSERVED RESULT
the shortcut pressed in the step 3 triggers its correspondent button/feature.
When Plasma language is english...
alt+a opens the window to choose an app;
alt+e triggers export feature;
alt+i triggers import feature;
alt+h opens help center;
alt+d reverts to defaults;
alt+r resets settings

EXPECTED RESULT
any alt+<letter> shortcut can be assigned to anything

SOFTWARE/OS VERSIONS
Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.19.80
KDE Frameworks Version: 5.74.0
Qt Version: 5.14.2
Comment 1 Derek Christ 2020-08-30 14:22:55 UTC
May be related to bug 424947
Comment 2 Nate Graham 2020-09-08 14:25:41 UTC
Heh, confirmed. I guess we should block the use of accelerators while assigning shortcuts.
Comment 3 Bug Janitor Service 2020-09-17 23:15:14 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kdeclarative/-/merge_requests/19
Comment 4 David Edmundson 2020-09-21 09:27:39 UTC
Git commit 88aabf069a0e454777c15227126732a04c8cb8b2 by David Edmundson.
Committed on 21/09/2020 at 09:27.
Pushed by davidedmundson into branch 'master'.

Block shortcuts when recording key sequences

Otherwise you can't select alt+a as a shortcut without triggering the
nmenomic generated shortcut on the "add application" button.

Testing done:
- clicked "Add custom shortcut", pressed alt+a, it was recorded
successfully

- focussed "Add custom shortcut", pressed alt+a, the relevant shortcut
activated

Note that isRecording was already declared, but not defined, which is
why it looks like my diff misses something.

M  +7    -0    src/qmlcontrols/kquickcontrols/KeySequenceItem.qml
M  +7    -1    src/qmlcontrols/kquickcontrols/private/keysequencehelper.cpp
M  +7    -0    src/qmlcontrols/kquickcontrols/private/keysequencehelper.h

https://invent.kde.org/frameworks/kdeclarative/commit/88aabf069a0e454777c15227126732a04c8cb8b2
Comment 5 Patrick Silva 2021-06-10 18:42:02 UTC
*** Bug 422823 has been marked as a duplicate of this bug. ***