How to disable caps lock in Windows

Registry entry to disable caps lock.
Registry entry to disable caps lock.

I find that the caps lock key is useless for me and it only hinders typing when accidentally pressed. It can be disabled on Windows by adding a registry entry.

  • Save the text below as a disable_caps_lock.reg file:

It creates a new registry entry HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout

  • Double-click the file to add this registry entry and its value. It will ask for Administrator permissions.

  • Restart Windows. Your caps lock key should be disabled now.

  • To enable the caps lock back, open the Registry Editor, delete the above entry and restart Windows.

Tried with: Windows 7 Professional 64-bit

How to disable caps lock in Linux

The caps lock key is a vestige from older times. It is completely useless today and extremely irritating because it gets turned on by mistake while using programs like Vim. It is a good idea to turn it off completely by disabling it.

The setxkbmap program can be used to disable caps lock completely in all desktop environments and window managers by mapping it to the Ctrl key:

$ /usr/bin/setxkbmap -option '' -option 'ctrl:nocaps'

To apply this setting every time you login to any desktop environment, add the above line to your ~/.profile file. Log out and login to see the effect of this option.

Other methods to disable caps lock that I used to try earlier are given below:

KDE

I use this in Kubuntu: open System Settings → Hardware → Keyboard → Advanced. Enable Configure keyboard options and under the tree of options choose Caps Lock is disabled.

Ubuntu 14.04

Install the GNOME Tweak Tool:

$ sudo apt-get install gnome-tweak-tool

Open it by typing Tweak Tool in the Dash. Choose Typing → Caps Lock key behavior. Confusingly, it is shown as Disabled. But this means that any customization on that is disabled. In the dropdown choose Caps Lock is disabled option and you are done!

Ubuntu 12.04

Open Keyboard Layout and click on the keyboard layout you are using, for example English (US). Click on Options → Caps Lock key behavior and choose Caps Lock is disabled.