Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save reorx/d7860cce3ed4ac294fad9840efeae0a1 to your computer and use it in GitHub Desktop.
Save reorx/d7860cce3ed4ac294fad9840efeae0a1 to your computer and use it in GitHub Desktop.
Remap Caps Lock to Control on Windows 10

Ways to remap caps lock to control on Windows 10

These methods in this gist worked for me on my U.S.-based keyboard layouts. I am unsure about other layouts. If you have problems, revert your changes; delete the registry key you created (and reboot).

Update: you should probably scroll down to approach 4 where I suggest using Microsoft PowerToys Keyboard Manager.

Approach 1. Manually through regedit

Navigate to and create a new binary value in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout named Scancode Map.

You will enter the raw bytes like this (thanks @quapka):

00 00 00 00 00 00 00 00 02 00 00 00 1d 00 3a 00 00 00 00 00

Save. Reboot. Done.

Approach 2. Make your own registry key file.

Thanks @datsuka-qwerty

Create a new .reg file and name it something meaningful like capstoctrl.reg. Edit the file and paste in the following:

[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

Save. Run the file. Reboot. Done.

Approach 3. Through PowerShell (as Administrator)

Open PowerShell as an administrator (Win + X)

$hexified = "00,00,00,00,00,00,00,00,02,00,00,00,1d,00,3a,00,00,00,00,00".Split(',') | % { "0x$_"};

$kbLayout = 'HKLM:\System\CurrentControlSet\Control\Keyboard Layout';

New-ItemProperty -Path $kbLayout -Name "Scancode Map" -PropertyType Binary -Value ([byte[]]$hexified);

Save. Reboot. Done.

Approach 4. Microsoft PowerToys

Give PowerToys a try for remapping not only capslock, but other keys as well. Microsoft PowerToys: Utilities to customize Windows 10.

Microsoft PowerToys: Keyboard Manager enables you to redefine keys on your keyboard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment