Added scrolling support to MS Ergonomic Keyboard 4000

Using these trusty steps, courtesy Philipp Klaus:

sudo aptitude install xbindkeys xautomation xdotool

sudo tee /lib/udev/keymaps/microsoft-ergonomic-keyboard << EOF
0xC022D 0xC1 # Zoom In
0xC022E 0xC2 # Zoom Out
EOF

sudo sed -i \
    's/0xc022d zoomin 0xc022e zoomout/microsoft-ergonomic-keyboard/' \
    /lib/udev/rules.d/95-keymap.rules

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

Run each command, then disconnect & reconnect the keyboard, then run xbindkeys. Worked liked a charm.


Written by Andrew Ittner in public on Wed 20 November 2013. Tags: technology