We're very pleased that you want to get in touch with us. Please fill in the form below:



or   Close this form  
Some content

Peter Pilgrim :: Java Champion :: Digital Developer Architect

I design Java EE and Scala software solutions for the blue-chip clients and private sector

Hey all! Thanks for visiting. I provide fringe benefits to interested readers: checkout consultancy, training or mentorship Please make enquiries by email or call +44 (0)7397 067 658.

Due to the Off-Payroll Working plan for the UK government, I am enforcing stricter measures on contracts. All potential public sector GOV.UK contracts engagements must be approved by QDOS and/or SJD Accounting. Please enquire for further information.

KeyRemap4MacBook for a Microsoft Natural Keyboard 4000

18 February 2013 Comments off

4 minutes

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
 http://xenonique.co.uk
 ======================================================================
-->
<root>
 <!--
 http://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+

No Comments

No comments yet.

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

Contents of this blog entry are under copyright © 2017 by Peter Pilgrim and associates. For enquiries after republishing, please contact us for permission. All requests for syndicated content will be ignored /dev/null, consider yourself warned!

I help to design, create and build JVM components and services that are behind popular e-commerce websites.

My Blurb

Please get in touch , directly, to establish hire availability, contract & consulting opportunities.

Speaking at Your Conference

Contact by invitation

What Peter Does

Contact