Customize Key Mappings on Surface and Other Keyboards

Configure a right Ctrl key, remap Caps Lock, and more.


As someone who uses keyboard shortcuts often to stay productive, comfortable access to the Ctrl key is a must.

The Surface Type Cover only offers a left Ctrl key which I find just disruptive enough to be a nuisance during everyday use.

Fortunately, Windows provides a (albeit obscure) mechanism to remap key bindings.

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,03,00,00,00,1d,00,3a,00,1d,e0,5d,e0,00,00,00,00

The Scancode Map key (described in detail here) enables you to configure custom key mappings such that pressing a key on the keyboard generates the scan code of another key.

Given my limited use of the Context Menu key and its natural proximity to a typical right Ctrl key, I find that remapping the Context Menu key to right Ctrl is perfect. Remapping Caps Lock as an additional left Ctrl key offers even more comfortable access and mitigates the age old problem of inadvertent Caps Lock activations. Note: If you will miss lack of the Context Menu key, know that Shift + F10 is an equivalent alternative in many places.

The above Scancode Map value will configure these changes for you. Save the entire block to a .reg file, then execute the file to import the value into the registry.

This Scancode Map has been available in Windows for ages so can be used to configure similar mappings in all kinds of keyboards (even for keys the keyboard doesn’t have). I use the below Scancode Map on my Microsoft Wired Keyboard 200 (a keyboard that lacks volume keys) to map Caps Lock to left Ctrl, PrtScn to Mute, ScrlLk to Volume Down, Pause to Volume Up, and Num Lock to null.

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,06,00,00,00,1d,00,3a,00,20,e0,37,e0,2e,e0,46,00,\

This remaps Caps Lock as described above while also adding volume control to 3 keys I never use anyway. Note: Num Lock to null was necessary to remap the Pause key correctly but also is a righteous change in itself since I never use the Num Pad for anything other than number entry.

For a list of available scan codes to insert into the Scancode Map, I’ve found that the list maintained in the SharpKeys source code is the most reliable. Feel free to try out SharpKeys as well if you prefer to modify the Scancode Map registry key with a graphical interface.

Note: Windows used to reset the Scancode Map after an OS upgrade which was incredibly annoying for someone in the Windows Insider program who installs OS updates frequently. Fortunately as of build 14951, that is no longer the case:

We’ve updated our migration logic to now include custom scan code mappings. That means that going forward from this build, if you’ve used Registry Editor to remap certain keys (for example, Caps Lock key to null), that change will persist across upgrades.

All the more incentive to configure the keyboard the way you like it.

3 thoughts on “Customize Key Mappings on Surface and Other Keyboards”

  1. Hi Mike,
    Can you tell me what the reg code would be to ONLY change the Context Menu key to a control key? I just got a Surface and the lack of right CTRL is a pain. Thanks!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s