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.
setxkbmap program can be used to disable caps lock completely in all desktop environments and window managers by mapping it to the
$ /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:
In newer versions of Kubuntu: System Settings → Input Devices → Keyboard
In older versions of Kubuntu: System Settings → Hardware → Keyboard → Advanced.
Enable Configure keyboard options and under the tree of options choose Caps Lock is disabled.
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!
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.