Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Revisit mapping Fn key under Windows 7 and BootCamp

Mid 2010 Macbook Pro, 13 inch, running Windows 7 Pro (x64) and BootCamp.


I want to swap the Fn and L-Ctrl keys to mimic other common PC keyboards. I've dealt with this issue for 7 years now. I have read many posts on this and other sites with no acceptable solution. Skip to the question below if you'd like.


Concept: I know the Fn key passes a code to the hardware because it can wake the computer from sleep. This code is not passed to the OS from the driver because the Fn key (or the other special keys like LCD brightness) will not cause the LCD back-light to turn on after it has turned off. Because the Fn key does send a code to the computer, there is hope that it can be remapped.


What I have looked into/tried:

Remapping programs:

these don't work because the OS doesn't see the Fn scan code, the driver doesn't seem to pass it on.

Physically rewire the keyboard:

I did this and it worked well for a couple years until (as has happened commonly), some keys (different part of the keyboard) quit working so the keyboard had to be replaced. I am trying to avoid this solution because it is a pain to pull the computer apart and rewire the keyboard. Also, I blew the LCD back-light fuse during the process and had to re-solder another. I don't want to go through this again.

Third-party drivers:

I know third party (https://github.com/samartzidis) Windows drivers exist for the Apple Wireless Keyboard that will probably work on this keyboard (with some .inf file manipulation) but I don't think these drivers preserve the functionality of the special keys (LCD/keyboard brightness and volume) and there are other undesirable issues with them.


A new idea?

The BootCamp driver that handles this keyboard is called keymagic.sys. When it is installed, it sets some registry keys that, given their name, may lead to a solution to telling the driver to actually pass the Fn key scan code. From the inf, the registry keys are:

[HIDKbFlt_Service_AddReg]
HKR,,"Keymap", 0x00000001, 0x69,0x46,0x6a,0x47,0x6b,0x48,0x91,0x8b,0x90,0x88
HKR,,"KeymapFn", 0x00000001, 0x0c,0x22,0x0d,0x1e,0x0e,0x1f,0x0f,0x20,0x10,0x27,0x12,0x23,0x13,0x55,0x18,0x21 ,0x27,0x54,0x2d,0x67,0x33,0x56,0x38,0x57
HKR,,"KeymapNumlock", 0x00000001, 0x0c,0x5d,0x0d,0x59,0x0e,0x5a,0x0f,0x5b,0x10,0x62,0x12,0x5e,0x13,0x55,0x18,0x5c ,0x24,0x5f,0x25,0x60,0x26,0x61,0x27,0x54,0x2d,0x67,0x33,0x56,0x37,0x63,0x38,0x57
HKR,,"enable", 0x00000001, 0x01
HKR,,"OSXFnBehavior", 0x00000001, 0x01
HKLM,%BOOTCAMP_KEY%,"KeyMagic",,"4.0.0.1"


Question:

Is there any information about these registry keys (especially "keymap" and "keymapFn")?


Some research:

In case these registry keys depicted scan codes, I translated them (as if they were macOS and Win codes) to try to see a pattern. I couldn't really see one. Here are the translations:


HKR,,"Keymap", 0x00000001,
0x69,0x46,0x6a,0x47,0x6b,0x48,0x91,0x8b,0x90,0x88
mac codes:
f13, xxx, f16, clr, f14, vlU, xxx, xxx, xxx, xxx
win codes:
nm9, f, nm*, g, nm+, h, scl, xxx, num, xxx


HKR,,"KeymapFn", 0x00000001,
0x0c,0x22,0x0d,0x1e,0x0e,0x1f,0x0f,0x20,0x10,0x27,0x12,0x23,0x13,0x55,0x18,0x21, 0x27,0x54,0x2d,0x67,0x33,0x56,0x38,0x57
mac codes:
q, i, w, ], e, o, r, u, y, ', 1, p, 2, nm3, =, [, ', nm2, n, f11, del, nm4, sht, nm5
win codes:
clr, pgD, rtn, act, xxx, mod, xxx, spc, sht, Rar, alt, end, pus, u, fin, pgU, Rar, t, ins, nm7, 3, v, 8, w


HKR,,"KeymapNumlock", 0x00000001,
0x0c,0x5d,0x0d,0x59,0x0e,0x5a,0x0f,0x5b,0x10,0x62,0x12,0x5e,0x13,0x55,0x18,0x5c, 0x24,0x5f,0x25,0x60,0x26,0x61,0x27,0x54,0x2d,0x67,0x33,0x56,0x37,0x63,0x38,0x57
mac codes:
q, xxx, w, nm7, e, f20, r, nm8, y, f7, 1, xxx, 2, nm3, =, nm9, rtn, xxx, l, f5, j, f6, ', nm2, n, f11, del, nm4, cmd, f3, sht, nm5
win codes:
clr, aps, ent, y, xxx, z, xxx, Lwn, sht, nm2, alt, res, pus, u, fin, Rwn, hom, slp, Lar, nm0, Uar, nm1, Rar, t, ins, nm7, 8, v, 7, nm3, 8, w


I'd appreciate any information regarding these registry keys. Thanks.

Posted on Apr 11, 2017 9:17 AM

Reply
4 replies

Apr 11, 2017 5:03 PM in response to Loner T

Thank you for the suggestion. I have considered it though wouldn't be pleased for these reasons: decreased portability (I like packing light); increased clutter (too much stuff on the desktop); decreased functionality (I like the special function keys especially the volume and LCD brightness which might not work on a different keyboard).


Edit: If we're not able to find information regarding these keymagic registry keys, I wonder if someone has suggestions on contacting Apple for information about them.

Apr 18, 2017 12:03 PM in response to questions4apples

Do you want to consider something similar to Sungwoo-Foldable-Silicone-Keyboard-Waterproof as an option?


The Registry values are read by KeyMagic.sys driver and these are all Terminator keys, unlike the Fn and Ctrl keys, which are Modifiers. For Modifiers, only key-press is registered and the subsequent keys are modified as appropriate.


The electrical modifications are closest. Special-order keyboards are an option, but may be expensive solutions.


You can also try talking to Apple Tech Support, but I do not hold much hope for a solution.


You may have already seen this keyboard mapping article .

Apr 19, 2017 1:42 PM in response to Loner T

The Sungwoo keyboard doesn't seem to be an option. It is an extra thing that gets in the way. It doesn't seem to support the special Boot Camp functions (brightness, volume, keyboard light). The backslash next to the space key is a big no-no for me.


How familiar are you with these registry settings? Do you believe or know if they actually translate to scan codes as I attempted to translate them? If they do, the "shift" key does seem to be represented which is also a modifier so I don't think the modifier vs terminator key is at issue. Can you provide any more information about the meaning of these registry settings?

Revisit mapping Fn key under Windows 7 and BootCamp

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.