Map Caps-Lock to Control in Windows 8.1

Before the Windows 8.1 update, I was able to map Caps-Lock to Controls through the type of registry tweak in this post:

Remapping a keyboard key in windows 8.1

However, after updating to 8.1, my tweak no longer works. What I had done was

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,02,00,00,00,1d,00,3a,00,00,00,00,00 

Windows 8.1 may have changed how it interprets the keyboard layout registry, I'm guessing.

I'm an avid emacs user, so this problem is a life-or-death scenario for me.


SharpKeys did it for me! I couldn't find any other way and as you've discovered the old registry hack doesn't work anymore :(

http://sharpkeys.codeplex.com/


Using regedit is the best way imo as you know it works. This will make caps-lock an additional ctrl. But won't mess with ctrl itself.

For windows 7 and 8 do the following:

Open regedit.exe

Go to this directory (in regedit):

~/HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Control/KeyboardLayout/

After clicking on that directory (KeyboardLayout) right click in the right box and add new Binary Value called 'Scancode Map'

For windows 7 write this:

00 00 00 00 00 00 00 00
02 00 00 00 1D 00 3A 00
00 00 00 00

For windows 8 write this, I have verified that this works on 8.1 and 10 (this is just four extra zeros):

00 00 00 00 00 00 00 00
02 00 00 00 1D 00 3A 00
00 00 00 00 00 00 00 00

Hit okay and reboot.


I am in the same situation. This is a partial fix. On the SysInternals web page at technet.microsoft.com, download the Ctrl2Cap.zip archive by Mark Russovich

Uncompress the zip file into a single directory. Open a CMD window with Administrator privileges (right-click on a CMD.EXE icon and choose "Run as administrator"). CD to the archive directory, run ctrl2cap /install and press ENTER. Close the CMD window and reboot (restart) the computer.

When Windows restarts, the CapsLock will function exactly as Control does. On Windows 8.0 and below, the left Control key will function as CapsLock would, shifting all letters to upper case and toggling the CapsLock indicator light on the keyboard. Unfortunately, on Windows 8.1 the left Control key still works as it used to. So, what is presented here is not a full solution, but it does the most important function: converts the CapsLock to Control.


Actually I think I've built the perfect solution here:

  • https://github.com/oblitum/Interception/blob/master/samples/caps2esc/caps2esc.cpp

As a Vim user, this is a must for me, and I've been using it with success on Windows for a long time. I just create an entry on HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run with regedit to point to the executable and it simply works.

It will make your CAPSLOCK not just CTRL (when chording) but also ESC (when pressed and released alone)!

To compile and install dependencies please check the repository README and main website for Interception.

I've also created a Linux version of the same here:

  • https://github.com/oblitum/caps2esc