[HOW TO] Fix the Linux Caps Lock delay issue, where CAps LOck lags behind

I am one of those people who uses CAPS LOCK to capitalize text, so the issue is quite annoying on Linux distros where there is a delay. I had found a fix for this, which included changing the key<CAPS> data in a keyboard map and reloading the keyboard map to my keyboard. This fix no longer works in Ubuntu 21.04. Here's what I was doing before:

// Create keyboard map
xkbcomp -xkb $DISPLAY myxkbmap
nano myxkbmap

// Replace the part that says key<CAPS> with this:

key <CAPS> {     repeat=no,     type[group1]="ALPHABETIC",     symbols[group1]=[ Caps_Lock, Caps_Lock ],     actions[group1]=[ LockMods(modifiers=Lock), Private(type=3,data[0]=1,data[1]=3,data[2]=3) ]   };

// Reload the file
xkbcomp myxkbmap $DISPLAY

It should be noted that this is not a perfect fix. When typing quickly you'll notice that the word I'm will result in I"m. This is a major improvement over I'M nonetheless.

2 Likes