Ed Andersen

Software Developer and Architect in Japan

Remap CapsLock key to Control key on Surface Windows RT

Ed Andersen Avatar

by

in

The CapsLock key is rubbish. Remapping it to Control is easy on OS X and the Happy Hacker keyboard I use on my desktops doesn’t even have one. On standard Windows you can run a key remapping program but WinRT is locked down (for now). Here is an easy way to map Caps Lock to Control.

First, hit the Windows key and type “Powershell”. Right click on the Powershell icon. You will see some options appear at the bottom of the screen – click “Run as Administrator. Agree to the UAC elevation prompt.

The elevated Powershell prompt will appear. You need to enter the following command and hit Enter:

Set-ItemProperty -path "HKLM:\SYSTEM\CurrentControlSet\Control\Keyboard Layout" -name "Scancode Map" -Value ([byte[]](0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x1d,0x00,0x3a,0x00,0x00,0x00,0x00,0x00))

This sets up some keyboard scancode remapping in the Registry, which is what keyboard remapping programs would do if they had access. Restart the machine (swipe from right, Settings Charm, power, Restart) to make the change take effect.

Good riddance Caps Lock!

Ed Andersen Avatar

About me

Hi! 👋 I’m a Software Developer, Architect and Consultant living in Japan, building web and cloud apps. Here I write about software development and other things I find interesting. Read more about my background.

Ed’s “Newsletter”

Get the latest blog posts via email ✌️


Comments

6 responses to “Remap CapsLock key to Control key on Surface Windows RT”

  1. You’re the man! Thanks for the tip.

  2. Do you know the mapping for Fn? That would be really handy because it (the type cover, at least) doesn’t have an Fn key on the left side, but does have a Ctrl.

    1. I’m afraid I don’t!

  3. Hi Ed, I just tried your command on my 1st gen Surface RT running 8.1 — it still works!

    It’s worth mentioning here, for people like me who are not good with powershell, that you can also reverse the change by doing:

    Remove-ItemProperty -path "HKLM:\SYSTEM\CurrentControlSet\Control\Keyboard Layout" -name "Scancode Map"

    ..and then reboot; caps-lock is back to the way it was.

  4. francesco Avatar
    francesco

    Hi,

    I would like to remap the caps with the Delete key (I am using an apple Bluetooth keyboard that does not have the Del button).
    Would you know the correct command to do this? Which one of those values is the control scan code?

    Cheers
    Francesco

Leave a Reply

Your email address will not be published. Required fields are marked *