Swapping Ctrl and CapsLock Keys in Windows
The Ctrl
key, being a common modifier for most software shortcuts, is quite inconveniently positioned on the keyboard. Meanwhile, the CapsLock
key, which is rarely used, occupies a prime location on the keyboard. Over my years of computer usage, swapping the positions of Ctrl
and CapsLock
keys has significantly improved my comfort and efficiency when using keyboard shortcuts.
Here’s how to swap these two keys using PowerShell commands (must be run as administrator):
$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);
References
- Remap Caps Lock to Control on Windows 10 - This link provides information about mapping CapsLock to Ctrl, rather than swapping them.
Author Xianmin
LastMod 2024-11-10
License 原创文章,如需转载请注明文章作者和出处。谢谢!