2

See also Map capslock to control in Windows 10.

In Windows 7 and 10, I was able to remap the Caps Lock to act as a Control key by updating the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout\Scancode Map key in the registry. I've documented the details here.

When I upgraded my personal laptop from Windows 10 to Windows 11, it continued to work as intended, but I later noticed that that key does not exist in the registry. I don't know how the system still knows to map Caps Lock to Control, but as far as that laptop is concerned, it's working the way I want it to.

I now have a work-issued laptop with Windows 11. Since the ...\Scancode Map key doesn't exist in the registry, I can't change it. I've used the PowerToys Keyboard Manager to map Caps Lock to Control, but the mapping doesn't apply in all contexts. In particular, it doesn't apply on the login screen or in applications being run as Administrator. (The registry hack does.)

(I've mapped Alt+. to Caps Lock so I can turn caps-lock off if it has been set accidentally.)

Is there a way to map Caps Lock to Control in Windows 11 that will apply in all contexts, including the login screen? Perhaps there's a Windows 11 registry key that corresponds to the Windows 10 ...\Scancode Map key?

  • "doesn't apply in all contexts" - What exactly does this mean? – Ramhound Jan 22 '24 at 20:03
  • @Ramhound: He means in non-logged-in contexts. – harrymc Jan 22 '24 at 20:08
  • I believe that Scancode Map still exists in Windows 11. Try returning it. – harrymc Jan 22 '24 at 20:09
  • @harrymc I don't see it when I run the Registry Editor. What exactly do you mean by "Try returning it"? – Keith Thompson Jan 22 '24 at 20:29
  • Just create the registry item with the exact same value as you used in Windows 10. – harrymc Jan 22 '24 at 20:33
  • @harrymc OK, I'll try that later. I'm still wondering about the fact that my personal laptop (W11 upgraded from W10) doesn't have that key, but still behaves as if it did. – Keith Thompson Jan 22 '24 at 21:17
  • 1
    I can confirm this hack does not work anymore in Win 11. Adding the entry does not change keyboard mapping anymore. It makes sense as you are upgrading from 10 to 11 and maybe the installation process is clever enough to copy the map to somewhere else and working. On a fresh installation I add the entry but not working. @harrymc if you find out which config is controlling the behaviour now in Win 11 please let me know. Thanks. – WesternGun Jan 25 '24 at 10:09
  • 1
    I just tested the registry trick in Windows 11 after reboot, and it half-works: CapsLock works like Ctrl, but Ctrl keeps its functionality. AutoHotKey does it perfectly well, but it requires login. At this point I don't think that there is a solution that works in non-login contexts. – harrymc Jan 25 '24 at 11:41
  • Strange that it works for you, but only halfly. Now you have 2 control keys. I am still looking for where does it go. – WesternGun Jan 25 '24 at 13:53
  • @harrymc I haven't had a chance to try this yet. I actually prefer having both keys act as Control, so if I can't swap them that's not a problem for me. – Keith Thompson Jan 25 '24 at 20:10
  • OMG I found out why.... it's so weird that Win 11 suddenly starts to use 0xe0 as higher byte for scan codes; it also explains why you now have 2 control keys. Please check my answer here: https://superuser.com/questions/1827375/windows-11-scancode-map-registry-trick-does-not-work-anymore – WesternGun Jan 26 '24 at 21:36

2 Answers2

1

I'm wondering if the correct scancode also depends on the hardware/keyboard being used? I'm just setting up a new laptop with Windows 11 and I first tried 1d e0 3a e0 to remap caps -> control based on this answer, but after rebooting caps was still caps. Then I tried the traditional 1d 00 3a 00 and after rebooting caps is now control (as it should be).

sqweek
  • 416
0

Change your higher bytes from 00 to e0 and the registry trick will start to work.

So in your solution, instead of having:

0x001D003A
0x003A001D

try to put:

0xe01De03A
0xe03Ae01D

Seems Win 11 suddenly starts to use 0xe0 as first byte of scan codes wherever there will not cause confusion. See my question and answer Windows 11 - scancode map registry trick does not work anymore

  • I just tried that on my work-issued Windows 11 laptop, and it didn't work. I disabled the PowerToys keyboard manager, updated the registry, and rebooted, and the caps lock key still acts as caps lock. The value of the Scancode Map key is 00 00 00 00 00 00 00 00 02 00 00 00 1d e0 3a e0 00 00 00 00 – Keith Thompson Jan 27 '24 at 04:58
  • Does you control work as CapsLock now? Want to figure out the order of old/new scan code – WesternGun Jan 29 '24 at 08:54
  • I adapted my "nocapslock" registry update for Windows 10. I don't want Control to work as CapsLock. I want both to act as Control. (Of course others might prefer to swap them.) – Keith Thompson Jan 29 '24 at 16:18