A few weeks ago I wrote a article on disabling the caps lock key in Windows. I decided since I have been writing some Linux articles I may as well show a way to do the same thing in Linux. Its a short, quick fix but it can be useful if you hate capslock like I do.
Below I outline the steps to disable the key:
I have not figured out a global way to disable the capslock key but it is fairly easy to do on a per user basis.
If we want to disable it just for the current session we can issue this command in a shell:
- xmodmap -e "remove lock = Caps_Lock"
If you would like to do this on a more permanent basis for every session then you can add this short code to the end of you usrers .bashrc file.
This is generally located in /home/.bashrc:
- #remove capslock
- if [ "$PS1" ]; then
- xmodmap -e "remove lock = Caps_Lock"
- ...
- fi
You can now either logout and log back in as your user or you can simply issue the command “bash” in a shell to update your environment variables.