Skip to content


Gnu/Linux with a MS Natural Ergonomic 4000 Keyboard

Hello folks. Just some little Infos und how to get the special keys of the Microsoft Natural Ergonomic 4000 Keyboard running under linux. There is a handy tool called xbindkeys to do such things. with xbindkeys you can find out the keycodes for every button you like… Just type “xbindkeys -k” into terminal and press the button you want to know the keycode for… The code then gets printed in the Terminal…

All you have to do now is to extend the .xbindkeysrc file in your home directory (create it if it’s not already there).
In this File you put in the Command you want to launch an associate it with the keycode.
Like this:

What? Example of Line in .xbindkeysrc
Comment ;-) # Microsoft Ergonomic 4000 Web/Home Button
Command “firefox”
Keycode m:0×10 + c:180

now start xbindkeys in your terminal… and voila… key bound to your custom command :-D

If you use Gnome you could now add xbindkeys to autolaunch (Its in System->Settings->Session).
For your convienience i’ll provide you my custom .xbindkeysrc. It has also a binding for the ThinkVantage Button on a Thinkpad T400 (it launches a terminal now ;-) )

put the following into .xbindkeysrc in your home directory!

#
# Custom .xbindkeysrc
#
# .xbindkeysrc from http://www.puerro.net/2009/04/linux-ms-natural-ergonomic-4000-keyboard/

# Microsoft Ergonomic 4000 Favorite 1
"emacs"
m:0x10 + c:192

# Microsoft Ergonomic 4000 Favorite 2
"thunar"
m:0x10 + c:193

# Microsoft Ergonomic 4000 Favorite 3
"gnome-terminal"
m:0x10 + c:194

# Microsoft Ergonomic 4000 Favorite 4
#"gnome-terminal"
# m:0x10 + c:195

# Microsoft Ergonomic 4000 Favorite 5
"gnome-terminal"
m:0x10 + c:196

# Microsoft Ergonomic 4000 Web/Home Button
"firefox"
m:0x10 + c:180

# Sroll Lock becomes Screen Lock ;-)
"gnome-screensaver-command --lock"
m:0x10 + c:78

#mp 04.01.2008 thinkpad button
"gnome-terminal"
m:0x0 + c:156

# see http://www.puerro.net/2009/02/thinkpad-t400-switching-monitors/
#automatic xrandr yai... Alt+F6
"/home/mp/scripts/detectvga.sh"
m:0x18 + c:72

Have Fun! :-D

Posted in !programming, *nix, no.

Tagged with , , .


0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.



Some HTML is OK

or, reply to this post via trackback.