Vim Tips Wiki
Advertisement

Previous TipNext Tip

Tip: #775 - Remapping Caps to Shift

Created: August 22, 2004 23:15 Complexity: basic Author: Kris M Version: 5.7 Karma: 14/5 Imported from: Tip#775

In "keyword #166" a tip for mapping Caps_Lock to Esc was posted. I never liked having Caps_Lock as Escape though. I didn't want an easier way to hit Escape, I wanted to prevent unexpected things from happening when I accidently 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


Much thanks to avlondono on the #vim channel for his help with this.

Comments

wow I must have been tired. I meant VimTip166

montumba , August 22, 2004 23:17


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 its a joy on a normal keyboard. (But I use a touchstream, I don't have this problem mouahaha).

dunderxiv--AT--hotmail.com , August 23, 2004 8:01


I have a bunch of mappings for control so depending what I am capitalizing I might get some mixed up results. But for others control is definatly a good idea as well.

montumba , August 23, 2004 9:45


Take out the capslock key and insert it rotated by 180degrees, it will be stuck and never trigger by mistake.

I did this years ago, those silly keys which change context/focus are capslock, start, menu; they ought to be sent back to the silly Boy.

- Pasta (programmers against silly typing aids). [We don't need no start button, linux never crashes - Pasta].

Pasta d' Costa from Calungute beach. , August 23, 2004 14:37


Advertisement