We have ergonomic keyboards at work which I'm not entirely used to. I seem to keep hitting the capslock key while I'm in
vim and it's starting to annoy. How can I disable this key, and or change to to be another key?
The quick and dirty way to disable it is with
The next question is what would you like to do with it? I usually make it either a Ctrl key:
Depending on your DE/WM, there is likely a way to do this in the GUI configuration. For example Gnome has a "keyboard layout" option on the control pannels with an options tab that includes several similar layout modifications.
The setting to disable your capslock is
This would be placed in your
Another option - to disable it temporarily, you can use a
and then, to restore normal behavior:
Using xmodmap will only change the key binding while in X. If you need it on the console it's a little different. The changes below will modify X as well as the console, so I always do it this way.
For Linux add this to /etc/rc.local (or make an init script):
For Solaris on a PC with a USB keyboard edit
Locate this line:
Replace with this:
Naturally you can replace Control with any key you would like.
This is a portion of my
You can check the keycodes by running