Tuesday, 29 September 2020

How to disable the Caps Lock key on Ubuntu

Keyboard

I dont like Caps Lock, it's the the most unnecessary key on the keyboard in my opinion. I hardly ever write more than couple of words in capitals, but often accidently hit the key; suddenly finding myself TYPING IN ALL CAPS LIKE A SCREAMING MONKEY. Here’s an easy way to disable your Ubuntu’s Caps Lock key.

1. Install dconf

I already had this installed
$ sudo apt install dconf-tools

2. Disable caps lock (reenable by pressing both shift keys at once)

$ setxkbmap -option "caps:none"
$ setxkbmap -option "shift:both_capslock"
I did only disable for now.

-- UPDATE
This works but running this automatically is of course what was missing in this post so I added step 3 

3. Add this to your .bashrc file

vim .bashrc