Reduce Caps Lock Delay in Linux

If you are used to using Caps Lock to switch between uppercase and lowercase letters, you’ve probably encountered a delay resulting in second uppercase letter.

A lot of Windows, and to some extent OS X users,  are used to using Caps Lock while typing to switch between lowercase and uppercase letters. This is a result of learning how to use keyboard during the first interaction, thus becoming a default habit later on. Some people are saying that using Caps Lock for switching is incorrect and that the correct key for switching  between uppercase and lowercase letters is Shift (including its usage for different symbols in numerical keyboard.). Before while the typewriters were in use, Caps Lock was mostly used for writing titles and the mechanical part of typewriter would adjust for it when activating it. If you wanted uppercase letter, you would use Shift while typing.

What’s the problem with Caps Lock?

All Linux distributions have the same behavior. The consequence is presence of delay when switching between uppercase and lowercase letter when using Caps Lock. This is due to the fact that  on/off is switched when releasing a key instead of it being switched on key press.

For example if you use Caps Lock when switched the result would be: “LAtest version of Ubuntu Budgie is 17.10”. X Display server emulates behavior of typewriters which outputs the text with delay for first and second letter with third being correctly. This problem in relation to xorg, for example with Ubuntu has been reported multiple times 

As well on the the freedesktop bug tracker

There are patches posted in reports which should correct the problem, but it doesn’t fix it completely.

Until that’s solved, or Wayland becomes the norm, we can temporarily fix the problem with the following shell script.

All you have to do is download the files above by cloning repository or by downloading zip file, and place the shell script and xbkmodmap in your /home folder. After that give it executable permission by opening terminal in /home after extraction typing: chmod +x

After that, add the shell script to the list of startup programs via Startup Application Properties or similar GUI tool. (Add: sh “/home/” )


After next reboot, the delay should be less noticeable.

Nikola Stojic
Law student, entrepreneur, writing about startups and tech, StartupBlink Ambassador

Reduce Caps Lock Delay in Linux

by Nikola Stojic time to read: 2 min