Bug 484655

Summary: NumLock and CapsLock misbehave in Wayland
Product: [Plasma] kwin Reporter: Shinri <zincentimeter>
Component: wayland-genericAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED DOWNSTREAM    
Severity: normal CC: fanzhuyifan
Priority: NOR Keywords: wayland
Version: 6.0.3   
Target Milestone: ---   
Platform: NixOS   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Reproducing capslock misbehavior

Description Shinri 2024-03-28 11:26:42 UTC
Created attachment 167887 [details]
Reproducing capslock misbehavior

SUMMARY
Both NumLock and CapsLock misbehave in Wayland

STEPS TO REPRODUCE

1. Enable NumLock (Or CapsLock) in desktop or one general app
2. Switch to an app (like firefox) using Alt+Tab
3. Input numbers with numpads (or alphabets for Capslock) in the address tab

OBSERVED RESULT
The numpads (0-9 and dot) fails to give any inputs (nor the arrows) with NumLock light on. I have to turn the light off to use numpads in some cases. I also rolled back to plasma 5 to test. This bug does not appear in my plasma 5.

EXPECTED RESULT
The CapsLock or NumLock should enable the capital alphabets or numpads number key, respectively.

SOFTWARE/OS VERSIONS
Linux: 6.6.22
KDE Plasma Version: 6.0.3
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.3

ADDITIONAL INFORMATION

- I made a screencast in the attachment, which produce the bug.
- I've tested numerous apps, including those built with Qt (Kate, Konsole), GTK (Reminna), and other apps (Kitty Terminal). I only finds kitty workable for both NumsLock and CapsLock keyboard modifiers. I also tested Kate and Konsole under GNOME mutter / Wester as well as Kwin but nothing works.
Comment 1 fanzhuyifan 2024-03-28 22:42:35 UTC
I can't reproduce with capslock or num lock on wayland, git master build, Qt 6.7, arch linux. The state of capslock/numlock is correctly persisted when alt-tabbing from konsole to firefox, or from firefox to konsole. Also cannot reproduce when switching between konsole & kate.

>   I also tested Kate and Konsole under GNOME mutter / Wester as well as Kwin but nothing works.

Given that this is reproducible on other wayland compositers (mutter+weston), and on non-kde apps (firefox), it is highly unlikely that this is a bug in KDE software.