Thursday, September 28, 2006

Hacking the Microsoft Natural Ergonomic Keyboard 4000

I am very happy with my Microsoft Natural Ergonomic Keyboard 4000 as it's finally a natural keyboard that (again) has the inverted T arrow keypad and the standard-size insert key, just like the good ol' 101-key days. In other words, it's like the original Microsoft Natural keyboard, but with "new interweb buttons", an even more natural layout (the "comfort curve design" makes more sense for the way fingers are laid out) and a "zooming thingy".

That "Zoom slider", however, should have been sold/marketed as a "Scroll rocker button", because I do far more scrolling than zooming and, besides, you can usually zoom by scrolling and holding down the Ctrl key in most programs. Well, those by Microsoft anyway.

Anyway, it turns out it's configurable if you:

  1. don't mind editing some XML

  2. don't mind that it's not really XML
    Just try adding an XML comment to document your changes (like <!-- changed by Oli -->) and watch the type32.exe (or itype.exe, depending on your version) program crash every time you hit a magic key to see what I mean. :p

Here's a DIFF of the changes to C:\Program Files\Microsoft IntelliType Pro\commands.xml that disable most customizations of the C319 and C320 keys, which are rock up/away and rock down/toward, respectively. I know it works with versions 5.3.606.0 (aka 5.30.606.0) and 5.5.661.0 (aka 5.50.661.0) of the IntelliType software, maybe also others.

--- commands.old 2005-03-15 04:46:45.000000000 -0500
+++ commands.xml 2006-09-26 15:45:38.718750000 -0400
@@ -1606,8 +1606,8 @@
<C101 Type="5" KeySeq="alt rightarrow" />
<C103 Type="5" KeySeq="escape" />
<C300 Type="5" KeySeq="enter" />
- <C319 Type="6" Activator="ZoomIn" />
- <C320 Type="6" Activator="ZoomOut" />
+ <C319 Type="6" Activator="ScrollUp" />
+ <C320 Type="6" Activator="ScrollDown" />
<C1101 Type="6" Activator="HorizontalScroll" />
<C1003 Type="7" Subtype="0" />
@@ -1694,8 +1694,6 @@
<Application UniqueName="rctrl_renwnd32" AppName="Microsoft Outlook">
<C1003 Type="7" Subtype="3" wParam="0x01672" />
<C401 Type="5" KeySeq="F7" />
- <C319 Type="6" Activator="OutlookZoomIn" />
- <C320 Type="6" Activator="OutlookZoomOut" />
<Application UniqueName="screenClass" AppName="Microsoft PowerPoint">
<C100 Type="5" KeySeq="pageup" />
@@ -2124,8 +2122,6 @@
<C309 Type="0" />
<C204 Type="0" />
<C315 Type="1" wParam="0x09cc4" />
- <C319 Type="6" Activator="ZoomOut" />
- <C320 Type="6" Activator="ZoomIn" />
<C401 Type="0" />
<C900 Type="1" wParam="0x09cf0" />
<C902 Type="0" />
@@ -2138,8 +2134,6 @@
<C311 Type="1" wParam="0x09d23" />
<C310 Type="1" wParam="0x09cb4" />
<C315 Type="1" wParam="0x09cc7" />
- <C319 Type="6" Activator="ZoomOut" />
- <C320 Type="6" Activator="ZoomIn" />
<C401 Type="1" wParam="0x19d47" />
<C900 Type="1" wParam="0x09cf0" />
<C902 Type="1" wParam="0x09ddb" />
@@ -2158,8 +2152,8 @@
<C101 Type="1" wParam="0x01798" />
<C103 Type="0" />
<C102 Type="0" />
- <C319 Type="5" KeySeq="ctrl add" />
- <C320 Type="5" KeySeq="ctrl subtract"/>
+ <C319 Type="6" Activator="ScrollUp" />
+ <C320 Type="6" Activator="ScrollDown"/>
<Application UniqueName="MSN6 Window" AppName="MSN Window">
<C204 Type="5" KeySeq="ctrl y" />
@@ -2188,8 +2182,8 @@
<C106 Type="1" wParam="0x0a125" />
<C104 Type="2" lParam="0x05" />
<C105 Type="2" lParam="0x06" />
- <C319 Type="6" Activator="ZoomOut" />
- <C320 Type="6" Activator="ZoomIn" />
+ <C319 Type="6" Activator="ScrollUp" />
+ <C320 Type="6" Activator="ScrollDown" />
<Application UniqueName="Internet Explorer_TridentDlgFrame" AppName="Internet Explorer Child">
<C103 Type="0" />
@@ -2230,8 +2224,8 @@
<C105 Type="2" lParam="0x06" />
<C106 Type="2" lParam="0x07" />
<C104 Type="2" lParam="0x05" />
- <C319 Type="6" Activator="ZoomOut" />
- <C320 Type="6" Activator="ZoomIn" />
+ <C319 Type="6" Activator="ScrollUp" />
+ <C320 Type="6" Activator="ScrollDown" />
<Application UniqueName="HH Child" AppName="HTML C302">
<C310 Type="1" wParam="0x000cf" />

Warning: The preceding code block came with no warranty whatsoever, so if your dog died, your significant other left you and/or your house burned down as a result of reading the previous code block, well, sorry, but you should have read this disclaimer first. Please don't sue me.


Unknown said...

Very useful blog - thanks!

By the way, the method works with IntelliType However, after modifying commands.xml, I had to restart the IntelliType process in order for the changes to take. I did this by killing itype.exe via Task Manager, and then restarting it by running the "Microsoft Keyboard" shortcut from the Start Menu.

Olivier Dagenais said...

You're welcome!

You may be interested that I have since posted about another way of achieving this customization that is a little more resilient than trying to copy/paste a patch file from a web page. :)

Anonymous said...

How do you apply this??
I managed to get the code off the page then tried using a file comparing tool and transferred the code to the original xml file and it didn't work..
Short of analyzing the whole lot and working out how it works, can you give out a clue or two? ta-ra

Anonymous said...

ahhh never mind I found an explanation at

only 2 modifications to be done, in fact I have the zoom remapped to copy and paste so I free the forward buttons for something else.

Instead of doing what the guy of that page said I changed them with :

C319 Type="5" KeySeq="ctrl c"
C320 Type="5" KeySeq="ctrl v"

anyway many thanks to you for throwing the original hint of what can be done, I'll go back to that file a bit more that's for sure, maybe I an hack another keyword type too..