Skip to content

Instantly share code, notes, and snippets.

@mochsner
Last active September 2, 2021 01:42
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 mochsner/29c4677a26b5904c11c0fc773c3f5cc2 to your computer and use it in GitHub Desktop.
Save mochsner/29c4677a26b5904c11c0fc773c3f5cc2 to your computer and use it in GitHub Desktop.
Windows 10 Map CAPS to CTRL
# Set CAPS LOCK = Ctrl (Vim/Emacs), then restart computer
$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