If you're like me and use Caps Lock for capitalization, this default delay will drive you mad. I couldn't find any Fedora KDE specific fixes, so I'm writing this in hopes to help others who experienced the same issue.
note: Github repos aimed to fix this for broad distros didn't seem to work for me, so this will be a manual guide.
First, back up your capslock file:
sudo cp /usr/share/X11/xkb/symbols/capslock /usr/share/X11/xkb/symbols/capslock.bakAnd then edit the file:
# You can use any text editor of your choice
sudo nano /usr/share/X11/xkb/symbols/capslockFind the ctrl_modifier section, it'll look something like this:
hidden partial modifier_keys
xkb_symbols "ctrl_modifier" {
replace key <CAPS> {
type[Group1] = "ONE_LEVEL",
symbols[Group1] = [ Caps_Lock ],
actions[Group1] = [ SetMods(modifiers=Control) ]
};
modifier_map Control { <CAPS> };
}; Replace it with this:
hidden partial modifier_keys
xkb_symbols "ctrl_modifier" {
key <CAPS> {
type="ALPHABETIC",
repeat=No,
symbols[Group1]= [ Caps_Lock, Caps_Lock ],
actions[Group1]= [ LockMods(modifiers=Lock), LockMods(modifiers=Shift+Lock,affect=unlock) ]
};
};After, to sync changes, Log out of your session then log back in.
THIS ALONE DID NOT SEEM TO WORK.
Open System Settings > Keyboard > Key Bindings > Caps Lock Behavior. If it's not already enabled, enable the "Configure Keyboard Options" toggle.
Enable the "Make Caps Lock act as an additional Ctrl modifier, but keep identifying as Caps Lock" option.
Voila! You should now have a caps lock key that works without delay! This is a permanent fix, and even works in the OS login screen.
For those who may have encountered this problem in the past, you'll notice its very similar to these fixes:
but whereas X11 seems to work just fine with changing the ctrl_modifier section, Wayland seems to require this extra step.
Thanks for the note!
I find it strange that this has been a persistent problem on Linux for like over a decade. I think I remember reading somewhere on the official forums that this is actually as intended, where key presses are meant to emulate mechanical typewriters.