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.
Note: If you are using fcitx5, none of the above would work.
Go to fcitx5 settings. Then go to
Global Options > Behaviour > Check "Active by Default".Currently, fcitx5 on Wayland is in the experimental state. So, certain errors might appear. Especially check what the default input method is from
fcitx5-diagnose.Edit 2: Even that doesn't seem to work. But one thing works:
Step 1: Keeping the
Caps Lockon, change your input method to a different language (Ctrl + Space or Left Shift or whatever)Step 2: Try to type something.
Step 3: The text will appear as capital letters (in the preedit)
Step 4: Use
Ctrl+SpaceorLeft Shiftagain to return to your previous keyboard layout.Step 5: Now, your
Caps Lockwill work as usual.