sponsor Vim development Vim logo Vim Book Ad

basic Tip #353: Swap caps-lock and control keys using MS Windows Registry

 tip karma   Rating 75/29, Viewed by 3428 

Read and edit this tip on the Vim tip wiki. The wiki may have a more recent version of this tip.

created:   October 29, 2002 11:41      complexity:   basic
author:   Jacques Petit      as of Vim:   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

 rate this tip  Life Changing Helpful Unfulfilling 

<< disabling cabbrev | Find in files - recursively (NOT :grep!). Only for unix clones. >>

Additional Notes

digitect (at) mindspring • com, October 29, 2002 18:58

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. ;)
bhl at bigredswitch.com, November 1, 2002 12:04
This site has an explanation on what's going on here:
http://www.annoyances.org/exec/forum/winxp/t1004806455
This
j r p e t i t AT y @ h o o . c o m, November 27, 2002 11:45
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.
-- Jacques

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

[email protected], March 11, 2004 12:52
Here is the Windows 2000 Registry file to swap caps key with the ctrl key;

Windows Registry Editor Version 5.00


[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

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Sponsored by Web Concept Group Inc. SourceForge.net Logo