Philipp's Computing Blog

Success is about speed and efficiency

Microsoft Natural Ergonomic Keyboard 4000 with Mac OS X and Linux

Mac OS X

There's a good blog post by David Röthlisberger on the Microsoft NEK 4000 on Mac OS X.

To remap the zoom slider to scroll I replaced the com.microsoft.keyboard.pref (from Microsoft's Mac OS X driver) with the one found in Scott Bezek's blog post Remapping Zoom on the Microsoft Natural Keyboard 4000 - Mac OS X (referenced in Q#403324 on SuperUser.com):

cd ~/Library/Preferences
mv com.microsoft.keyboard.pref com.microsoft.keyboard.pref.bak
wget http://scottbezek.com/com.microsoft.keyboard.pref
open /Library/PreferencePanes/Microsoft\ Keyboard.prefPane
# works.

Linux

Making the Zoom Slider Work on Ubuntu 12.04

Here are the instructions to make the zoom slider work on 12.04:

### getting prerequisits
sudo apt-get install xbindkeys xautomation
### creating our custom keymap:
sudo tee /lib/udev/keymaps/microsoft-ergonomic-keyboard << EOF
0xC022D 0xC1 # Zoom In
0xC022E 0xC2 # Zoom Out
EOF
### chaning the udev rules
# replace the default keymap with our new one:
sudo sed -i \
  's/0xc022d zoomin 0xc022e zoomout/microsoft-ergonomic-keyboard/' \
  /lib/udev/rules.d/95-keymap.rules
### defining the behaviour when using the zoom slider:
cat > ~/.xbindkeysrc << EOF
## Use the slider to scroll up and down
## http://ubuntuforums.org/showpost.php?p=11336640&postcount=178
"xdotool click 4"   # Scroll Up
c:201
"xdotool click 5"   # Scroll Down
c:202
## Alternatively use it to Zoom in and out
## http://ubuntuforums.org/showpost.php?p=11479681&postcount=182
#"xte 'keydown Control_L' 'mouseclick 4' 'keyup Control_L'"
#c:201 + Release
#"xte 'keydown Control_L' 'mouseclick 5' 'keyup Control_L'"
#c:202 + Release
EOF
# unplug the keyboard, plug it in again and run
xbindkeys
# now you should be able to scroll using the zoom slider.

More Links for (Ubuntu) Linux:

Arch Linux

sudo vim /usr/lib/udev/hwdb.d/60-keyboard.hwdb
# edit section # Microsoft Natural Ergonomic Keyboard 4000
# as you like
sudo udevadm hwdb --update
# unplug and plug back in the keyboard

Resources for Arch Linux: