Skip to content

Instantly share code, notes, and snippets.

@iamsilvio
Created October 16, 2018 14:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iamsilvio/a56cea81edb5a8e852257f21c2907e50 to your computer and use it in GitHub Desktop.
Save iamsilvio/a56cea81edb5a8e852257f21c2907e50 to your computer and use it in GitHub Desktop.
Map caps lock to Ctrl on Windows
#-> Map caps lock to control (Run as Admin -> reboot required)
$hexified = "00,00,00,00,00,00,00,00,02,00,00,00,1d,00,3a,00,00,00,00,00".Split(',') | ForEach-Object { "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