4 responses to “Hacking the Natural 4000 keyboard”

  1. Adam

    Thanks for taking the time to put this together! I found it extremely helpful. Karma++!

  2. Scott

    Thanks for this information since I’m annoyed with the limitations in the IntelliType software. Between this information and some information on the Autohotkey site I was able to remap all my special keys on this keyboard to do whatever I want using the well-documented and feature-filled autohotkey software (rather than the limited intellitype software).

    In case it’s of use to anyone else, here’s what I did.

    You can create scripts directly using Autohotkey for any of the key codes that it can pick up. Use its instructions to discover the key codes for the special buttons and then set these keys to “disabled” in the intellitype software control panel so you can work with them directly with Autohotkey.

    Unfortunately, the favorites 1-5 and the help, undo, etc (alternate F1-F12) keys don’t send any special keycodes that Autohotkey can recognize. To send these keys to Autohotkey you need to do what you describe here and remap the keys in the IntelliType configuration files and registry to send keystrokes which Autohotkey can then pick up. For example, I’m having the Help (F1) key send ALT-CTRL-SHIFT-F1 from the IntelliType software which Autohotkey can pick up and do something more useful with.

    I ran into the issue of almost not having enough of the Microsoft command numbers to remap all the keys that Autohotkey couldn’t pick up. As you noted, some actions like “logoff” will still take their action no matter how you remap them with the commands.xml file. The command ids I used that seemed (mostly) to work globally without undesired side-effects were 100, 101, 102, 103, 200, 201, 202, 203, 204, 301, 302, 307, 308, 309, 310, 311, 315. I deleted most of the application-specific actions from the commands.xml file and just left the “StandardSupport” section and an empty language section for English.

    Removing application-specific settings isn’t a problem since autohotkey can also map keys differently depending on the application or active window if you want the keys to act differently in different applications.

    I ran into problems with the ids 100-103. They would fire from IntelliType when a window was active, but the keys didn’t seem to fire when I was hovering the mouse over an icon on my desktop, for example.

    I fixed the problem of special circumstance IntelliType keys by editing the mscmdkey.xml file and changing appCommand=‘36’ for each of these items. This appCommand number originally went with the copy command, but IntelliType didn’t care that some other items in mscmdkey.xml also used this appCommand too. It successfully changed the behavior so the key acted globally rather than just in a specific circumstance or window.

    I’m thinking that perhaps some of the keys that don’t remap well to other behaviors might be able to be remapped to do standard key combinations by changing their appCommand number to 36 or one of the appCommands that doesn’t take any specialized action. Maybe it would be possible to use the commands such as “logoff” to do other things if you change their appCommands in mscmdkey.xml. I suspect the appCommand number references an action elsewhere (perhaps in one of those dlls) and the more extreme actions could be neutered by changing their appCommands to something else.

    I hope this is helpful to someone out there.

  3. lilalurl

    Hey Scott,

    Thanks for sharing the tips.
    Although when I got that keyboard I quickly hacked into commands.xml, I never understood why some keys kept some functions.
    Now I know I have to modify mscmdkey.xml too.
    Funnily I am an AHK user too. Now thanks to you I can use Browser_back and Browser_forward (C101 & C100) for working with my WIP scripts. I usually set one of them to save the script, reload and winactivate the window I want the script to act on and the other to go back to the editor I use for the script. Very convenient.

    I think I didn’t see those explanations on the AHK forums, although there are some MS NK4000-related threads. Might be a good idea to post a copy there for others.

  4. Takui

    Hello, I’ve read this post. I’ve the same keyboard, and I want to remap the favorite keys to do what a normal key do (letter, f1-f12, isn’t important), because I want to use them in a program who can recognize only standard keys…anyway, I’ve don’t understand what I’ve to write to remap these particular buttons… someone can explain it better? I’ve understood that Scoot does it, but how? O_o