Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

One of my laptop's keys has fallen off. Is there any way I can remap another key to serve as that key? I'll 'sacrifice' the other key because I never use it.

share|improve this question
    
This article describes various means and programs : "Remapping the Keyboard Layout in Windows", either yourself via the registry or thru several utilities. –  harrymc Sep 7 '09 at 6:10
5  
Scroll lock: Why are you looking at me? –  Colonel Panic May 30 '13 at 23:44

8 Answers 8

up vote 22 down vote accepted

Here is a good article from Howtogeek about using a utility called SharpKeys:

Map Any Key to Any Key on Windows 7 / XP / Vista

If you are tired of the way certain keys on your system work, such as the Caps Lock key, you can re-map them to function as a different key by using a registry hack. But there should be an easier way, right?

This is where SharpKeys comes into the picture: It’s a small utility that will let you easily map one key to another key easily, or even turn the key off, without having to enter the registry at all.

For instance, I used the key mapping to just turn off my Caps Lock key, since I never use it.

image

You can click the Add button to bring up the Add New Key Mapping dialog, where you can either select the keys to map from the lists, or just click the Type Key button and press the key manually (which I find much more intuitive)

image

Once you are done, click the Write to Registry button and you’ll be told to log off or reboot for the changes to take effect.

image

If you want all the technical details on how the registry keys work, you can read about how to map keys using registry hacks.

Link for reference

share|improve this answer
1  
For simple remapping this is the way to go, no need to write a full blown autohotkey script. I swear by AHK don't get me wrong, but thats more for keyboard combinations rather than simple remapping. –  John T Sep 7 '09 at 5:58
    
Very easy to use - would be more lovely to be able to toggle the keys (enable/disable it) without deleting anything –  Nam G VU Feb 4 '11 at 5:14
    
Will this allow me to swap the Fn and Ctrl key in Windows on a Macbook Pro Retina running Bootcamp? Thanks. –  DotNetHaggis Aug 27 '14 at 13:31

Using Microsoft Keyboard Layout Creator here without problems. For switching modifier keys I would suggest a registry hack or an application that changes the registry for you, do not use a pure software remap like AutoHotkey as those solutions don't work for every application.

Another solution is to get a replacement key in case you really can't insert the key back in your laptop, have you tried a search for 'broken laptop key'?

share|improve this answer
2  
This is th best solution I have found - unlike AutoHotKey and Keytweak, I can modify the characters generated with modifiers, without changing the unmodified behaviour. Now I can get ( and ) without Shift, 9 and 0 are unaffected! :D –  James Broadhead May 23 '11 at 9:23
    
Well, for my case of converting a qwertz keyboard into a qwerty keyboard this does not work, because ctrl+z stays next to the t. :( –  ANeves Mar 1 '14 at 17:33

You can use Microsoft's Keyboard Layout Creator.
This will even allow you to add extra functionality to your keyboard, such as changing a key into a dead key (e.g. ~), add extra mappings (e.g. altgr+c ->ç), etc.

In order to edit the special keystrokes, like ctrl+FOO, you might need to edit the .klc file manually.
You can find instructions by @Senseful in http://superuser.com/a/172993/157884 :

You need to modify the .klc file manually.

Basically you just modify the VK_ column to match the value in column 1.

So for example if you want to bind L to N, you would create the keyboard as you normally would in KLC. Then you would open the KLC file in a text editor. Find the value L in the VK_ column, and switch it to an N.

For more information, I wrote the complete steps on my blog.

Warning: incomplete support for key bindings in somme applications

However, be warned that some applications might not take those special keystrokes properly.

As an example: with my particular configuration, pressing altgr+a in DotA2's teamchat will erase the text — instead of adding an ã like in other applications.

share|improve this answer

I have Genius KB-G235 USB keyboard (HID) and WinXP SP3. Neither of applications in previous answers didnt work for me. (Because working with PS/2 codes or not (fully) with XP).

I tried HotkeyP (freeware) http://petr.lastovicka.sweb.cz/others.html and this works! Just add action for key and its done. (After assign new action isn't default action executed.)

share|improve this answer

http://www.autohotkey.com/ can be a simpler and powerful solution. You can remap keys and create modifiers keys using scripts like

;Use Capslock as a modifier and not as capslock anymore
$*Capslock::
    Gui, 99:+ToolWindow
    Gui, 99:Show, x-1 w1 +NoActivate, Capslock Is Down
    keywait, Capslock
    Gui, 99:Destroy
    return

;Write functions for keys while capslock is beeing hold here
#IfWinExist, Capslock Is Down
    j::Down
    k::Up
    l::Right
    h::Left
    m::AppsKey
    i::Insert
    d::Delete
#IfWinExist

;Use right and left shifts to toggle capslock
RShift & LShift::
    SetCapsLockState, % (State:=!State) ? "On" : "Off"
    return

LShift & RShift::
    SetCapsLockState, % (State:=!State) ? "On" : "Off"
    return
share|improve this answer
    
Please quote the essential parts of the answer from the reference link, as the answer can become invalid if the linked page changes or the target site is unreachable/permanently offline. –  DavidPostill Sep 4 '14 at 10:25

The easiest way: The Microsoft Keyboard Layout Creator. This is an official Microsoft solution. Functionality is similar like Ukelele for OS X.

Download and instructions: http://msdn.microsoft.com/en-GB/goglobal/bb964665.aspx

share|improve this answer

Keyman Desktop - You can even create your own custom keyboards with Keyman Developer. With keyboards for over 1000 languages, Keyman Desktop lets you type in your language even when Windows doesn’t.

share|improve this answer

I found one app which can do almost all of them in windows 7 and it works without any issues when your desktop is unlocked. Also it is pretty easy to use.

http://sourceforge.net/projects/hotkeyp/?source=typ_redirect.

Only drawback I found is it will not work when desktop is locked say I come back from sleep and the computer is locked and I have loud music playing. Multimedia keyboards can mute from there itself. But with this app you need to unlock first.

share|improve this answer

protected by Community Apr 6 at 20:32

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.