I’ve got a small keyboard, which is great for desk space, but means that quite often I fat-finger the caps-lock key. This can cause some rather annoying issues, especially when using mutt and vi.

Easy solution in X is to do:

xmodmap -e 'keycode 66 ='

which disables the key entirely. That’s great, but very
occasionally I want to use it. So instead I can do:

xmodmap -e 'keycode 66 = NoSymbol Caps_Lock'

This means it works in combination with shift, but not on its own. I put it into my .xmodmap file so it gets applied at each login.

Of course, as shift is next to caps-lock, I’ll probably hit both next time…

Update: Yes, I hit both a lot… I’ll be tweaking these again sometime!

Leave a Reply

Your email address will not be published.