Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save yavorski/f5cbce58547649fcc9ac598df3b5579e to your computer and use it in GitHub Desktop.
Save yavorski/f5cbce58547649fcc9ac598df3b5579e to your computer and use it in GitHub Desktop.
Remap Caps Lock to Control on Windows 10

Create a new binary value in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout named Scancode Map

[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

or use PowerShell (run as Admin)

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

# Remap both CAPS LOCK + Application/Menu to CTRL
$hexified = "00,00,00,00,00,00,00,00,03,00,00,00,1d,00,3a,00,1d,e0,5d,e0,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);

Reboot after.

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