Reassigning the caps lock key on Windows or OS X
You need Autohotkey and this script:
;Deactive CapsLock key
$CapsLock::
return
Autohotkey is THE most powerful way to do this sort of thing on a WIndows PC. Also see this page for more details on re-mapping CAPS,
I've used SharpKeys (for windows) to remap CapsLock to ESC.
Works great for vim. VI-style editing really shines if you can keep your fingers near the home row at all times.
Here's how to swap the Caps Lock key with left Ctrl:
Windows
- Click Start > Run
- Type "regedit"
- Navigate to
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout
- While Keyboard Layout has focus, go to Edit > New > Binary Value
- Enter "Scancode Map" as the name
Enter the following as the Data:
0000: 00 00 00 00 00 00 00 00 0008: 03 00 00 00 3A 00 1D 00 0010: 1D 00 3A 00 00 00 00 00
Exit the Registry Editor
- Log out and log back into Windows
Linux
- Create a file in your home directory called .xmodmap if it doesn't already exist
Paste the following lines into the file:
remove Lock = Caps_Lock remove Control = Control_L keysym Control_L = Caps_Lock keysym Caps_Lock = Control_L add Lock = Caps_Lock add Control = Control_L
Add the following line into ~/.bash_profile
xmodmap ~/.xmodmap
Source