Skip to content

Instantly share code, notes, and snippets.

@robdaemon
Created April 11, 2021 22:43
Show Gist options
  • Save robdaemon/39113e360bb578e9aded75bc42f91500 to your computer and use it in GitHub Desktop.
Save robdaemon/39113e360bb578e9aded75bc42f91500 to your computer and use it in GitHub Desktop.
swap ctrl and capslock on windows 10
$hexified = "00,00,00,00,00,00,00,00,03,00,00,00,1d,00,3a,00,3a,00,1d,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