Skip to content

Instantly share code, notes, and snippets.

@Bandicoot
Created September 13, 2025 20:33
Show Gist options
  • Save Bandicoot/c47af33163fbcd77db2979ecbbcfde81 to your computer and use it in GitHub Desktop.
Save Bandicoot/c47af33163fbcd77db2979ecbbcfde81 to your computer and use it in GitHub Desktop.
Make Caps Lock function as Control on Windows. End the ISO/vt220 madness! PowerShell edition.
```
$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:SystemCurrentControlSetControlKeyboard Layout';
New-ItemProperty -Path $kbLayout -Name "Scancode Map" -PropertyType Binary -Value ([byte[]]$hexified);
```
@Bandicoot
Copy link
Author

I don't know where I got this from on the 'net. Doing it this way is a historical artifact, given that PowerToys for Windows exists.

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