Bug 494610

Summary: Capslock is detected as Ctrl and also Capslock when it it assigned to be mapped to Ctrl
Product: [Applications] systemsettings Reporter: Mehrad Mahmoudian <m.mahmoudian>
Component: kcm_keyboardAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED WAITINGFORINFO    
Severity: normal CC: butirsky, dev, duha.bugs, kde, natalie_clarius, nate
Priority: NOR    
Version First Reported In: 6.1.5   
Target Milestone: ---   
Platform: Manjaro   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Screenshot of the field that has detected key combination

Description Mehrad Mahmoudian 2024-10-12 17:50:51 UTC
Created attachment 174744 [details]
Screenshot of the field that has detected key combination

SUMMARY

I have mapped my Capslock to be an additional Ctrl from the System Settings. This works fine and everything usually works fine (it sometimes behaves weird when combined with Shift+Alt in Emacs).

Now, I went to create a keybinding in the System Settings, and I wanted the command to be triggered by Ctrl+Shift+e, so naturally I clicked on the "Input" button (which makes the System Settings to wait for a key combination input), and then pressed Capslock+shift+e, but it got registered as Ctrl+Shift+Capslock (and "e" is not even registered). It seems the Capslock key is detected twice, once before getting mapped and once after as Ctrl.

So the way I went around it was to use the actual Ctrl key during the key combination registration, and then from there after for daily use I use the Capslock

STEPS TO REPRODUCE
1. Map the Capslock to be a Ctrl from the System Settings
2. test it and make sure it is a Ctrl (e.g try Capslock+c and Capslock+v for copy-pasting)
3. go to System Settings > keyboard > Shortcuts
4. click on "+Add New" button give a command (e.g `notify-send 'aa'`) and press "+Add"
5. Click on the Input button to register a key combination, then press Capslock+Shift+e
6. see the registered value

OBSERVED RESULT

When I try to register the keys, Capslock is registered as Ctrl and Capslock simultaneously. (check the attached photo)

EXPECTED RESULT

I expect that Capslock be registered as Ctrl because I have mapped Capslock to be Ctrl from the settings.

SOFTWARE/OS VERSIONS
(available in the Info Center app, or by running `kinfo` in a terminal window)
Operating System: Manjaro Linux
KDE Plasma Version: 6.1.5
KDE Frameworks Version: 6.6.0
Qt Version: 6.7.2
Kernel Version: 6.6.54-2-MANJARO (64-bit)
Graphics Platform: Wayland
Processors: 4 × Intel® Core™ i5-7440HQ CPU @ 2.80GHz
Memory: 15.4 GiB of RAM
Graphics Processor: Mesa Intel® HD Graphics 630

ADDITIONAL INFORMATION
- My keyboard layout is ISO-Nordic (i don't think that should matter though)
- This might be remotely connected to https://bugs.kde.org/show_bug.cgi?id=478208 but I'm not so sure
Comment 1 Wismill 2024-11-22 06:07:25 UTC
I cannot reproduce this. Could you:
- Provide the version of the package xkeyboard-config (or xkb-data)?
- Provide the content of your ~/.config/kxkbrc? So we get the exact config you are using.