Skip to content

Instantly share code, notes, and snippets.

@subnut
Forked from wfxr/swap_ctrl_caps.ps1
Created April 16, 2021 19:58
Show Gist options
  • Save subnut/65a18307b5c6fdf1cb47b450dfc000df to your computer and use it in GitHub Desktop.
Save subnut/65a18307b5c6fdf1cb47b450dfc000df to your computer and use it in GitHub Desktop.
Swap ctrl and capslock in Win10
$hexified = "00,00,00,00,00,00,00,00,03,00,00,00,3A,00,1D,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);
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,3A,00,1D,00,1D,00,3A,00,00,00,00,00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment