Current location: Brighton, UK

Mapping AltGr for XP on the MacBook Pro

Posted on Thursday, June 22, 2006 @ 13:55 CET

Secondary Enter key

After setting up Parallels on my MacBook Pro I can work in XP while in OSX which is great. Things are a little slower than usual, but pumping up the RAM allotted to Parallels seems to do the trick. Hopefully FlashDevelop will be ported over to OSX soon so I'll have no reason to keep running XP :)

In any case, the keyboard mapping is a little off, at least on the norwegian keyboard layout. The MBP keyboard is a strange beast in of itself, at least when compared to the Windows-based keyboards I'm used to, but the lack of AltGr made typing the @ key, and these [] {} brackets impossible to type in XP via Parallels (on the norwegian keyboard SHIFT+2 is ", while AltGr+2 is the @ sign. Same thing for the brackets mapped to AltGr+7, 8, 9 and 0.)

A bit of Googling turned up the fact that you can use CTRL+ALT to mimick the AltGr key. So CTRL+ALT+2 now gives me the @ key. The MBP @ key (still getting used to the fact that @ deserves its own key) is mapped to the single apostrophe, '. CTRL+ALT+7 gives me the { key, which is kinda useful when programming. Etcetera.

The MBP also has a second enter key, the numerical keypad's enter key sitting to the right of the right-Apple key. Why do I need two Enter key's on the keyboard? I'm still not sure, but after some more Googling I found a way to map this to AltGr in XP.

  1. First off, download SharpKeys and install it in XP. You need version 2 of the .NET framework, but its linked to on that page
  2. Run SharpKeys, and click Add to create a new key binding
  3. Scroll down and find the "Num: Enter (E0_1C)" key in the left column. You can also click on "Type key" and type the secondary Enter key
  4. On the right hand column, scroll down and find "Special: Right Alt (E0_38) and click OK
  5. Click on "Write to Registry" and close the program

The secondary Enter key is now mapped as AltGr and everything is good again :)

Update [23.10.2006]: The last build of Parallels (Build 1940 from October 12) sports "better keyboard support" where the right Apple key is now mapped to the "right-mouse button" key found on Windows keyboards. In addition, the useless extra Enter key is now mapped to the left Windows button so the fix mentioned above won't work. Why they didn't map it to the right Windows button I don't know, but that way you could have easily mapped it. However, doing so now would render the left Apple key useless since it too is mapped to the left Windows key.

In any case you can map the right Apple key to AltGr by using SharpKeys and mapping "Special: Application(E0_5D)" to "Special: Right Alt(E0_38)." I assume you have right-mouse button on your mouse anyways :)

- paulo

Comments:

1
Fred Mosekjær writes:
Thank you for your solution - it alså works when running XP via Bootcamp 1.1
-fred

# September 14, 2006 12:09 CET

2
Hjalti writes:
Thanks a lot! Really needed this (we have similar mappings for icelandic keyboards).

# September 18, 2006 19:20 CET

3
William writes:
Thank you for the tips. I also have Macbook and you solution helps!

# September 11, 2007 15:16 CET

4
Paulo replies:
Glad to hear it helped you guys out :)

# September 11, 2007 15:35 CET

Post a comment:

You must have Flash and JavaScript enabled to post a comment.