Skip to content

Instantly share code, notes, and snippets.

@arosemena
Created June 18, 2021 01:41
Show Gist options
  • Save arosemena/6130925d90dbb3f4b07bb3f1b058e04c to your computer and use it in GitHub Desktop.
Save arosemena/6130925d90dbb3f4b07bb3f1b058e04c to your computer and use it in GitHub Desktop.
Maps the Caps Lock key to Esc in windows, needs a restart after
$bytes = "00,00,00,00,00,00,00,00,02,00,00,00,01,00,3a,00,00,00,00,00".Split(',') | % { "0x$_"};
$key = 'HKLM:\System\CurrentControlSet\Control\Keyboard Layout';
New-ItemProperty -Path $key -Name "Scancode Map" -PropertyType Binary -Value ([byte[]]$bytes);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment