Vim Tips Wiki
Advertisement
Tip 353 Printable Monobook Previous Next

created October 29, 2002 · complexity basic · author Jacques Petit · version 5.7


This will allow you to use the caps-lock key as a control key. Makes using vim in win32 much nicer in my opinion.

Place the following text into a text file with the extension *.reg and update your registry by double-clicking the file:

REGEDIT4
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,1d,00,3a,00,00,00,00,00

Comments

I'd suggest, if the text above is copied into a file "caps2ctrl.reg", also making a file "un-caps2ctrl.reg" in which you place the following:

REGEDIT4
[-HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]

This gives you a way to reverse things if you don't like it. ;)


This site has an explanation on what's going on here: http://www.annoyances.org/exec/forum/winxp/t1004806455


Quick addendum to my tip. The registry entry above sets the caps to ctrl. The following registry entry actually swaps the caps-lock and registry keys on your keyboard. Useful if you like using caps-lock from time to time. Remember, to undo this, just delete this entry and your system will revert to the default behavior.

REGEDIT4
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,03,00,00,00,1d,00,3a,00,3a,00,1d,00,00,00,00,00

Instead of using [HKEY_LOCAL_MACHINE\....], you can also use [HKEY_CURRENT_USER\Keyboard Layout] to make changes for one user account only.

Advertisement