Vim Tips Wiki
Advertisement

Obsolete tip

This tip has been merged into another tip.
See VimTip166 for the current tip.

Please do not edit this tip, and do not edit the discussion page.
If anything needs to be improved, please fix VimTip166.


Tip 775 Printable Monobook Previous Next

created August 22, 2004 · complexity basic · author Kris M · version 5.7


I don't like mapping Caps_Lock to Escape as is done in VimTip166. I don't want an easier way to hit Escape, I want to prevent unexpected things from happening when I accidentally hit Caps_Lock when I was trying to hit Shift. With Caps_Lock mapped to escape i still got unexpected results. So here is how your bind Caps lock to the Shift key under Xwindows:

Just put this in a file in your home directory called .Xmodmap

remove lock = Caps_Lock
keycode 66 = Shift_R
remove shift = Shift_R
add shift = Shift_R

Comments

Shift and Shift at the same place isn't very useful. One thing that is though is to remap Caps-Lock to Ctrl. Its safe to hit accidentally and it provides a very good place to do Ctrl-W or Ctrl-X Ctrl-L etc.

That's basically how the Happy Hacking keyboard is implemented too, and it's a joy on a normal keyboard.


Advertisement