Bug 470257

Summary: The alternative shortcut for layout switching should support modifier-only shortcuts
Product: [Applications] systemsettings Reporter: Oded Arbel <oded>
Component: kcm_keyboardAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: wishlist CC: butirsky, nate, xalt7x.service
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=464805
https://bugs.kde.org/show_bug.cgi?id=470256
https://bugs.kde.org/show_bug.cgi?id=470113
https://bugs.kde.org/show_bug.cgi?id=453506
https://bugs.kde.org/show_bug.cgi?id=420493
Latest Commit: Version Fixed In: 6.1
Sentry Crash Report:

Description Oded Arbel 2023-05-25 14:05:54 UTC
SUMMARY
When configuring keyboard layout switching, it would be very useful if we can stop using the xkbcommon "Main shorctuts" with all their limitations (e.g. https://github.com/xkbcommon/libxkbcommon/issues/92 ) and use Plasma internal keyboard shortcut management. But only if bugs #464805 and #470256 are also solved - otherwise we will still be in the same leaky boat.

STEPS TO REPRODUCE
1. Open System Settings -> Input Devices -> Keyboard -> Layouts
2. Click the shortcut input for "Alternative Shortcut"
3. Press and hold ALT+SHIFT, then release them.

OBSERVED RESULT
Nothing happens. The shortcut input button still shows "Input..."

EXPECTED RESULT
The shortcut button will show "Alt+Shift" and will set up the global shortcut ALT+SHIFT to trigger layout switching.

SOFTWARE/OS VERSIONS
Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.27.80
KDE Frameworks Version: 5.240.0
Qt Version: 6.5.0
Kernel Version: 6.2.0-20-generic (64-bit)
Graphics Platform: offscreen
Processors: 8 × Intel® Core™ i7-7820HQ CPU @ 2.90GHz
Memory: 31.2 GiB of RAM
Graphics Processor: Mesa Intel® HD Graphics 630
Comment 1 Andrey 2023-05-26 11:53:45 UTC
And single-modifier shortcuts don't work also?
Comment 2 Oded Arbel 2023-05-28 10:54:30 UTC
(In reply to Andrey from comment #1)
> And single-modifier shortcuts don't work also?

Correct. In the shortcuts KCM, if I try to enter a multi-modifier-only shortcut, it will succeed setting up the shortcut, using only one of the modifiers (interestingly, the modifier that is released first is used - i.e. for the sequence ALT_press, SHIFT_press, SHIFT_release, ALT_release - then SHIFT will be chosen as the single modifier that is being set). In the keyboard KCM, any combination of modifier only presses and releases (of either one or more keys) leave the input field without any key combination registered.
Comment 3 Bug Janitor Service 2024-03-20 17:59:28 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kxmlgui/-/merge_requests/215
Comment 4 Bug Janitor Service 2024-03-20 18:02:28 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/2133
Comment 5 fanzhuyifan 2024-03-27 21:53:04 UTC
Git commit ec6869d945d73d37042232c93116aac6a19162a4 by Yifan Zhu.
Committed on 27/03/2024 at 21:49.
Pushed by fanzhuyifan into branch 'master'.

kkeysequencewidget: expose modifierOnlyAllowed

M  +10   -0    src/kkeysequencewidget.cpp
M  +10   -0    src/kkeysequencewidget.h

https://invent.kde.org/frameworks/kxmlgui/-/commit/ec6869d945d73d37042232c93116aac6a19162a4
Comment 6 fanzhuyifan 2024-03-27 22:45:56 UTC
Git commit d3916175477a88d83615501510a2d18cde62096c by Yifan Zhu.
Committed on 27/03/2024 at 21:53.
Pushed by fanzhuyifan into branch 'master'.

kcms/keyboard: allow modifierOnly shortcuts

M  +6    -0    kcms/keyboard/kcm_keyboard.ui

https://invent.kde.org/plasma/plasma-desktop/-/commit/d3916175477a88d83615501510a2d18cde62096c