Bug 482397

Summary: Swapping CTRL and Caps lock does not swap controls but turns both keys to caps lock
Product: [Applications] systemsettings Reporter: Tobias Bora <tobias.bora>
Component: kcm_keyboardAssignee: Plasma Bugs List <plasma-bugs-null>
Status: REOPENED ---    
Severity: normal CC: butirsky, fanzhuyifan, natalie_clarius, nate
Priority: NOR    
Version First Reported In: 5.27.10   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Tobias Bora 2024-03-04 16:31:43 UTC
SUMMARY

If I enable "swap Ctrl and caps lock", both keys are turned into Caps lock instead of being swapped.

STEPS TO REPRODUCE
1. Go to keyboard > advanced > Ctrl position and enable "swap Ctrl and caps lock".

Screenshots available in https://github.com/NixOS/nixpkgs/issues/293278#issuecomment-1976938917

OBSERVED RESULT

Observe that now both CTRL (left) and caps lock are mapped to caps lock key, instead of being swapped. setxkbmap, on the other hand, does not have this issue (but first, make sure to type `setxkbmap us` or alike, otherwise KDE will still be used as the input system).

EXPECTED RESULT

I would expect caps to be a ctrl key, not a caps key anymore.

SOFTWARE/OS VERSIONS

Operating System: NixOS 23.11
KDE Plasma Version: 5.27.10
KDE Frameworks Version: 5.113.0
Qt Version: 5.15.12
Kernel Version: 6.1.79 (64-bit)
Graphics Platform: X11
Processors: 16 × 12th Gen Intel® Core™ i5-1240P
Memory: 15.2 Gio of RAM
Graphics Processor: Mesa Intel® Graphics
Comment 1 Nate Graham 2024-03-05 20:15:48 UTC
Is it still happening in Plasma 6?
Comment 2 Tobias Bora 2024-03-06 02:40:53 UTC
I can confirm that the bug is also present in plasma 6… but it is in fact more subtle than I was thinking: the behavior is correct for the azerty layout… but not for the BEPO AFNOR layout. So just changing the layout between azerty or bepo would trigger the bug.
Comment 3 Tobias Bora 2024-03-06 02:41:34 UTC
forgot to change the status
Comment 4 Tobias Bora 2024-03-06 02:44:06 UTC
Also, note that plasma 6 has many bugs, notably related to shortcuts. For instance, typing Ctrl + alt + T would not start Konsole, Fn + sound would not change the volume… and the volume applet is actually even completely gone from the systray (at least in NixOs). So I will switch back to plasma 5, and use a workaround I found: if I enable ibus input system, then it works as expected.