Skip to content

Instantly share code, notes, and snippets.

@wfxr
Last active October 10, 2022 05:48
Show Gist options
  • Save wfxr/d61ce6eb9bf186068044ef2a5cfadb95 to your computer and use it in GitHub Desktop.
Save wfxr/d61ce6eb9bf186068044ef2a5cfadb95 to your computer and use it in GitHub Desktop.
Swap ctrl and capslock in Win10
$hexified = "00,00,00,00,00,00,00,00,03,00,00,00,3A,00,1D,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);
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,03,00,00,00,3A,00,1D,00,1D,00,3A,00,00,00,00,00
@Ivan-Igorevich
Copy link

Ivan-Igorevich commented Oct 10, 2022

thanks for your job. You should, probably, add a script to change it back)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment