KeyRemap4MacBook for a Microsoft Natural Keyboard 4000
18 February 2013 Comments off
Reading time:
4 minutes
Word count:
725
Do you use a Apple Mac Book Pro at work? If you do, then, and if you like to use Microsoft Natural Keyboard for your day job then you might have found that Microsoft and Apple devices do not quite play well together. Some of the most important programming keys are mapped to strange characters.
Luckily enough, the on the keyboard’s Windows Logo key is mapped to the Apple Alt key; and the keyboard’s Alt key is mapped to the Apple Command key. So it is not so bad on first use. You can also download the IntelliSense drivers from Microsoft for Apple OS X 10.7 and 10.8 and those help in remapping the Apple Command and Alt keys; fortunately the defaults just worked for me. The Number Lock key does not work at all and there is currently no way to fix this.
The biggest concern was the mapping of the double quotes, ampersand, tilde, back quotes and back slash characters. Because I develop software for a living, this reduced my productivity because they keys were mapped to different keys. I, then, found out about a popular tool called KeyRemap4MacBook. Using this program and help from Takayama Fumihiko, the developer/maintainer of KeyRemap4MacBook, eventually gave me exactly what needed.
Remapping Microsoft Natural Keyboard for Mac OS 10.8 here is the file:
<?xml version="1.0"?> <!-- ====================================================================== Mac OS 10.8 KeyRemap4MacBook for a Microsoft Natural Keyboard 4000 United Kingdom Layout By Peter Pilgrim 12th February 2013 peter dot pilgrim at gmail dot com https://xenonique.co.uk ====================================================================== --> <root> <!-- https://stackoverflow.com/questions/3202629/where-can-i-find-a-list-of-mac-virtual-key-codes /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/Headers/Events.h https://github.com/tekezo/KeyRemap4MacBook/blob/version_8.0.0/src/bridge/generator/keycode/data/KeyCode.data --> <symbol_map type="KeyCode" name="AMPERSAND" value="0x13" /> <symbol_map type="KeyCode" name="DOUBLE_QUOTE" value="0x27" /> <symbol_map type="KeyCode" name="BACK_SLASH_and_PIPE" value="0x2a" /> <symbol_map type="KeyCode" name="SECTION_SIGN_and_PLUS_MINUS" value="0x0a" /> <symbol_map type="KeyCode" name="BACK_TICK_and_TILDE" value="0x32" /> <symbol_map type="KeyCode" name="HASH" value="0x14" /> <item> <name>Micro Natural Keyboard - Swap Ampersand and Double Quote</name> <identifier>private.ampersand_and_doublequote</identifier> <autogen> --KeyToKey-- KeyCode::AMPERSAND, ModifierFlag::SHIFT_L | ModifierFlag::NONE, KeyCode::DOUBLE_QUOTE, ModifierFlag::SHIFT_L, </autogen> <autogen> --KeyToKey-- KeyCode::DOUBLE_QUOTE, ModifierFlag::SHIFT_L | ModifierFlag::NONE, KeyCode::AMPERSAND, ModifierFlag::SHIFT_L, </autogen> </item> <item> <name>Micro Natural Keyboard - Reconfigure Hash and Tilde key</name> <identifier>private.hash_and_tidle</identifier> <autogen> --KeyToKey-- KeyCode::BACK_SLASH_and_PIPE, ModifierFlag::NONE, KeyCode::HASH, ModifierFlag::OPTION_L, </autogen> <autogen> --KeyToKey-- KeyCode::BACK_SLASH_and_PIPE, ModifierFlag::SHIFT_L | ModifierFlag::NONE, KeyCode::BACK_TICK_and_TILDE, ModifierFlag::SHIFT_L, </autogen> </item> <item> <name>Micro Natural Keyboard - Reconfigure Backtick and Pipe key</name> <identifier>private.backslash_and_pipe</identifier> <autogen> --KeyToKey-- KeyCode::SECTION_SIGN_and_PLUS_MINUS, ModifierFlag::NONE, KeyCode::BACK_SLASH_and_PIPE, ModifierFlag::NONE, </autogen> <autogen> --KeyToKey-- KeyCode::SECTION_SIGN_and_PLUS_MINUS, ModifierFlag::SHIFT_L | ModifierFlag::NONE, KeyCode::BACK_SLASH_and_PIPE, ModifierFlag::SHIFT_L, </autogen> </item> <item> <name>Micro Natural Keyboard - Reconfigure Just Grave Key to Section Sign Key</name> <identifier>private.backtick_and_just_grave_key</identifier> <autogen> --KeyToKey-- KeyCode::BACK_TICK_and_TILDE, ModifierFlag::NONE | ModifierFlag::SHIFT_L, KeyCode::SECTION_SIGN_and_PLUS_MINUS, ModifierFlag::NONE , </autogen> </item> </root>
Basic syntax for customising KeyRemap4MacBook. Now Natural Keyboard developers on Apple Mac Book Pro can be productive again.
Have fun!
+PP+