Skip to content

Instantly share code, notes, and snippets.

@cleemesser
Created July 23, 2024 19:53
Show Gist options
  • Save cleemesser/e761a5e1ada4e1eff47303bf43c888e4 to your computer and use it in GitHub Desktop.
Save cleemesser/e761a5e1ada4e1eff47303bf43c888e4 to your computer and use it in GitHub Desktop.
remap capslock to control on windows (7,10,11..) using powershell
$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);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment