Map capslock to control in Windows 10
Solution 1
Did you remember to reboot? It works fine for me, just like in Windows 7 and 8.
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,02,00,00,00,1d,00,3a,00,00,00,00,00
Solution 2
In case anyone needed this done via PowerShell:
$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);
Run it as Administrator and reboot.
Solution 3
There is now a solution directly from Microsoft for mapping caps lock to the control key called PowerToys. PowerToys does not involve using a third party tool or modifying the registry by hand (which has the potential for causing serious problems if done incorrectly). The tool in PowerToys that handles this is installed by default and called Keyboard Manager. It works exactly as expected - here is an image of the Caps Lock key mapped to the Ctrl key.
Solution 4
You can use SharpKeys to map any key to any other key in Windows 7, 8, or 10. It's much easier and cleaner to do than to modify the registry yourself.
Hope this helps.
Solution 5
I use the following to send CTRL for the CAPS LOCK key, send ALT for the CTRL key, and send CAPS LOCK for the ALT key. CTRL is to the left of "A" where God intended it, ALT is below SHIFT, and the utterly useless CAPS LOCK key is safely tucked away where I have to break my wrist to hit it.
Windows Registry Editor Version 5.00
; The hex data is in five groups of four bytes:
; 00,00,00,00,\ header version (always 00000000)
; 00,00,00,00,\ header flags (always 00000000)
; 04,00,00,00,\ # of entries (3 in this case) plus a NULL terminator line.
; Entries are in 2-byte pairs: Key code to send & keyboard key to send it.
; Each entry is in "least significant byte, most significant byte" order,
; e.g. 0x1234 becomes `34,12`
; 1d,00,3a,00,\ Send LEFT CTRL (0x001d) code when user presses the CAPS LOCK key (0x003a)
; 38,00,1d,00,\ Send LEFT ALT (0x0038) code when user presses the LEFT CTRL key (0x001d)
; 3a,00,38,00,\ Send CAPS LOCK (0x003a) code when user presses the LEFT ALT key (0x0038)
; 00,00,00,00 NULL terminator
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,\
00,00,00,00,\
04,00,00,00,\
1d,00,3a,00,\
38,00,1d,00,\
3a,00,38,00,\
00,00,00,00
Related videos on Youtube
chtenb
Updated on September 18, 2022Comments
-
chtenb over 1 year
In Windows 8 I used to remap my capslock key to control using the registry script
REGEDIT4 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout] "Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,1d,00,3a,00,00,00,00,00
After having upgraded to Window 10, this does not work anymore.
How can it be done?
-
jia103 over 6 yearsNote this only remaps Caps Lock to another Ctrl key. I want them swapped, so I used the instructions here to tweak the script above: superuser.com/a/1202601/315584
-
-
Jack O'Connor over 8 yearsThe issue for me was that the Windows 10 upgrade reset my caps lock mapping. But doing it again the same way worked after another restart.
-
Mike Niebling over 7 yearsIf anyone else like me needs the final piece of the puzzle: paste the above into a new text file, save it with the
.reg
extension, double click the file to apply the changes to the registry, then reboot. -
Ehtesh Choudhury over 7 yearsHow do you map it back to
Caps Lock
afterwards? -
bojolais about 7 years@EhteshChoudhury you can delete the "Scancode Map" entry under the registry key, reboot, and default behavior will be restored.
-
zaphodtx almost 6 yearsI really appreciate the comments. I always wondered what the codes meant. Very helpful.
-
thanos.a over 5 yearsCan I use this to switch languages by pressing caps lock ?
-
thanos.a over 5 yearsthis works, however the caps lock functionality is lost. any idea on how to define the caps lock functionality to shift+caps lock combination?
-
Reb.Cabin about 5 yearsI tried the autohotkey solution and i do not recommend it. It doesn't work well if you have your autorepeat speed high, delay low. It also doesn't mix well with xkeymacs, which makes emacs keys work almost everywhere in Windows.
-
3pitt almost 5 yearsI don't use emacs, open a .ahk file automatically at login, and find this solution to be the most simple and portable by far
-
Артём Гаркавый over 4 yearsI only had to logout and login again, didn't have to reboot (win 10)
-
Артём Гаркавый over 4 yearsApparently logging out and an in again is sufficient
-
Andrei Boyanov almost 4 yearsWhat a nice explanation ! Do you know by any chance the kye code of the Windows key ? I need to remap the CapsLock to act as Windows Key
-
Ed Avis over 3 yearsI used the registry "Scancode Map" key for years, including on Windows 10, but one day it stopped working for Ctrl-X. Caps Lock acted as Ctrl most of the time, but not when used with the X key. Keyboard Manager seems to work correctly and also handles Ctrl-Alt-backslash, another key combination which can defeat remapping.
-
Ed Avis over 3 yearsFor me, Ctrl2Cap is currently the most reliable solution. The registry key "Scancode Map" does work in Windows 10, but strangely stopped working for the Ctrl-X keystroke in particular. The PowerToys Keyboard Manager works, including Ctrl-X, but doesn't work over remote desktop (and running it on the remote PC as well as the local one doesn't seem to let you remap successfully). Ctrl2Cap is remapping in all applications including remote desktop.
-
Ed Avis over 3 years...However, the PowerToys remapping does not work over remote desktop. You can remap on your local PC but the remote desktop session does not get the remapping. And running the same PowerToys on the remote PC doesn't work either. (It seems that somehow, both Ctrl and Caps Lock keypresses are being sent to the remote computer.)
-
xaxxon over 3 yearsJust wanted to note that this program just modifies your registry, so it's not something that has to be running all the time or anything. Great utility!
-
selurvedu over 3 years@AndreiBoyanov that would be
0xE05B
, so instead of1d,00,3a,00
you should use5b,e0,3a,00
. -
selurvedu over 3 yearsThanks for this answer! I spent a while to find an explanation for the data structure. Other answers and sources suggest a working solution without explaining how it works and how to alter it. SharpKeys, however, does the same with a user-friendly UI.
-
karmakaze about 3 yearsHere's the Microsoft Docs page and install link
-
scientific_explorer about 3 yearsI use emacs and this is a very feasible solution for me. I just execute the script at login every time on the desktop. I don't have admin rights.
-
Burgi about 3 yearsCould you go into a detail on how your answer differs from the others posted?
-
ceving over 2 yearsThe tool is a bit OP but it works better than the Registry key, because the Num Lock idicator on my keyboard still gets activated, when I use the Registry key., but stays off with this tool. All functions, which are not usefull can be disabled. I have installed from Github. Works fine.
-
Kellen Stuart over 2 years@binarymason it has gotten a lot better over the years. PowerShell was a pretty poor scripting language until they open sourced it and came out with PowerShell Core.
-
Kellen Stuart over 2 yearsCan anyone explain these scancodes and how to manipulate them?
-
Tom Dietterich over 2 yearsThis isn't working for me. It doesn't persist across restarts.
-
minhee over 2 yearsOne of its downsides is it does not work on administrator mode. Caps lock still can be toggled inside applications run as administrator, and if caps lock is turned on inside administrator mode, it never can be turned off outside. On the other hand, the other way to change the registry equally works on both modes.
-
kfmfe04 about 2 yearsMy settings didn't take after a reboot. When I brought up PowerToys, it said an update was needed. After the update, it started working again, without a restart.
-
Admin almost 2 yearsMy biggest issue with this solution is its inconsistency. When my machine gets very busy (bogged down with a virus scan for example) this will work in some apps but not others that I have open. Infuriating that there isn't a simple configuration option to make this work reliably.