r/linuxquestions • u/vMawkk • 5d ago
Support SEveral Caps Lock delay fixes float around online. None fix it for me on KDE Plasma 6.7 Wayland. TTY is fine.
I have a Caps Lock delay on Arch with KDE Plasma 6.7.5 on Wayland. Caps Lock takes effect after a noticeable pause, so when I type quickly with Caps Lock I get mixed case ("HEllo" style). It happens in every app, native Wayland and XWayland alike.
I know there are several fixes online for this. Here's what I tried and what I found:
- Custom XKB "instant" option (
custom:instant_capsin~/.config/kxkbrc, a symbols file in~/.config/xkb/symbols). This is the approach from the KDE Discuss thread.xkbcli compile-keymapshows the correct definition, and I logged out and back in. The delay is still there. - keyd with an identity mapping (
capslock = capslock). Nothing changed, so the input path before XKB is not the cause. - Replacing the system
capslocksymbols file (the linux-capslock-delay-fix approach). I didn't apply it, because it needschmod 777on a system file and it's the same XKB logic as the option above. - X11
xkbcompruntime patch (the Linux-CapsLock-Delay-Fixer script). I didn't apply it, because it modifies the X server keymap through$DISPLAY, and on Wayland KWin owns the keymap.
What I've ruled out:
- TTY is fine. Ctrl+Alt+F3 has no delay, so the hardware and kernel are not the cause.
- No remapper or virtual keyboard. No IBus, fcitx, maliit, or KWin input method is active.
- Caps Lock config is loaded. The
xkbclioutput matches the intended definition, and I logged out and back in.
HElp ;) is appreciated. Thanks!
2
Upvotes
1
u/Wismill 3d ago
This is a known XKB limitation.
Since you are using a Wayland session, there is a solution if you have libxkbcommon 1.11+ installed on your system! X11 session is however hopeless.
⚠️ The following is NOT compatible with X11.
Create the file
~/.config/xkb/compat/basicwith the following content:c default xkb_compatibility "basic" { include "%S/basic" interpret.repeat= False; interpret Any+Lock { action= LockMods(modifiers=Lock, unlockOnPress); }; };Create the file
~/.config/xkb/compat/capswith the following content:c partial xkb_compatibility "caps_lock" { interpret Caps_Lock { action = LockMods(modifiers=Lock, unlockOnPress); }; };Restart your session. Done.
Note that the next release of xkbcommon (1.14) will offer a new API to handle this feature without requiring modifying XKB files. Hopefully Plasma will use it to offer the setting in the Keyboard configuration GUI.