Microsoft Natural Ergonomic Keyboard 4000

The MS Natural Keyboard is pretty standard in terms of Linux support - except for the Zoom slider in the center of the board and the SpellCheck button (but who wants to disable their F keys?). There are two methods, one is low-level and requires patching the kernel, the other requires an external program.

For general setup, please read the Multimedia Keys article.

= Kernel Configuration =

Kernel config

If you compile it as module, then remember to load it with:

load module modprobe hid-microsoft

= Kernel Patching =

Both Zoom Slider inputs and the Spellcheck button send keycodes that are in the 400-range to the computer.

Unfortunately, X11 will not accept keycodes over 255. We will patch the kernel to re-bind the keys to send keycodes < 255.

Feel free to track the Freedesktop Bug Report.

Looking at the Default Keycodes
Lets see what the keyboard is currently sending - run showkey, and take a look at the output.

Press the slider up, then release

Push the slider down, then release

Push the Spellcheck button, then release (with F-Lock off)

Patching the Kernel
First, download the patch:.

Let's make a copy of your current kernel version to patch.

This is such a trivial patch, you could just merge this manually, but here is how to use the patch utility:

Compile and install the new kernel. Reboot your system.

Checking it worked
Lets see what the keyboard is currently sending - run showkey, and take a look at the output.

Press the slider up, then release

Push the slider down, then release

Push the Spellcheck button, then release (with F-Lock off)

X.org
By now, showkey should react to all keys on your keyboard, including zoom!

xev should react to all keys on your keyboard now, so using xmodmap and any keybinding utility like xbindkeys you may make use of all keys on your fancy Microsoft keyboard!

You can now follow the same method in the Multimedia Keys article to configure the slider and the spellcheck button.

= EvRouter =

If you use EvRouter, kernel patching is not necessary.

Install EvRouter and customize the following rules in .evrouterrc:

Zoom Slider as Zoom
~/.evrouterrc

Zoom Slider as Mouse Scroll
Replace "Zoom +/- action" with EvRouter actions (check its manpage). To use the zoom slider as a scroll slider:

File ~/.evrouterrc for scrolling slider

To enable key repeats in EvRouter (faster scrolling), you may try this patch from User:mfoliveira's git repository.

= udev =

Zoom Slider as Mouse Scroll
This is a very fast and easy way. Find a line like this and change 'zoomin' and 'zoomout' to 'pageup' and 'pagedown' (or 'up'/'down' if you want to scroll line by line): /lib/udev/rules.d/95-keymap.rules If you do not have such rule, add it between these lines: inside this block
 * 1) The following are external USB keyboards
 * 1) The following are external USB keyboards

...

GOTO="keyboard_end"