Monday 22 November 2010

Rebinding AltGr to Alt in Windows

I've had enough with that AltGr key on my laptop. I've never used it, and I still vaguely understand who actually needs it. In any case, this blasted key does not work as the usual Meta key in Putty! You can't, say, use AltGr+b to jump a word back in Bash or Emacs. Several solutions of this outrage can be found on the Internet, the most popular one is to use the AutoHotKey utility and assign a dynamical rule to rebind that key to the normal Alt. That solution does appear to work for most of the time, however, there seems to be a better way. Instead of using a third-party program, we can use the facilities provided by Windows itself, namely, the Scancode Map key in the Windows registry. The problem above can be solved by adding the following information to the registry:
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,38,00,38,e0,00,00,00,00
Basically, the only thing it does is that it makes the RAlt key (That is, Alt Gr) act exactly as the LAlt key. To make things work you just need to save the text above into a file with a .reg extention and double-click on it.

Additional information can be found at
http://www.microsoft.com/whdc/archive/w2kscan-map.mspx
Although the article was written for Win2k, the solution still works for WinXP and Windows 7. Still claiming Windows is user-friendly? :P.

1 comment:

  1. Many thanks for sharing this info...! :) I was looking over an hour in search for a solution for this.

    ReplyDelete