Make the zoom slider of Microsoft Natural Ergonomic Keyboard 4000 and 7000 scroll up and down, in 14.04 (Trusty)

Ubuntu 15.10: I had no success with previous answers.

I have successfully used approach similar to the previous ones - instructions were mentioned in /lib/udev/hwdb.d/60-keyboard.hwdb.

I've created new hwdb file using sudo nano /etc/udev/hwdb.d/70-keyboard.hwdb containing:

# Microsoft Natural Ergonomic Keyboard 4000 - remap zoom in/out to page up/down
evdev:input:b0003v045Ep00DB*
 KEYBOARD_KEY_c022d=pageup
 KEYBOARD_KEY_c022e=pagedown

after that I've run

sudo udevadm hwdb --update
sudo udevadm control --reload

and replugged the keyboard and it worked.

For model 7000 use evdev:input:b003v045Ep071D*


If you look at /lib/udev/rules.d/60-keyboard.rules you'll see that everything has been messed around with. This is just part of the udev merger into systemd that has gone on.

All hardware rules are compiled into a binary hardware database. These follow a really strange format. The existing rules for keyboards that ship with udev live in /lib/udev/hwdb.d/60-keyboard.hwdb. Look at that but don't edit it (updates will probably overwrite it).

To add your custom rules, we'll create a new file in /etc/udev/hwdb.d/ by running sudoedit /etc/udev/hwdb.d/61-keyboard-local.hwdb. All you need to do is paste in the following -

If you are using the 4000 model:

keyboard:usb:v045Ep00DB*
 KEYBOARD_KEY_0c022d=pageup
 KEYBOARD_KEY_0c022e=pagedown

If you are using 7000 model:

keyboard:usb:v045Ep071D*
 KEYBOARD_KEY_0c022d=pageup
 KEYBOARD_KEY_0c022e=pagedown

This is adapated from the tutorial you posted so you might need to tweak based on your keyboard. Look at lsusb and make sure the vendor:product code above (as v####p####) is correct. It won't work if they don't match.

Once you're done editing, recompile the hwdb that udev uses:

sudo udevadm hwdb --update

And then you might need to re-plug. If it's a PS/2 keyboard you might need to reboot. In some cases you also need to reboot.


The original solution posted by Oli did not work for me, but it works after I changed the key numbers "0c022d" and "0c022e" to "c022d" and "c022e". I'm using a 4000 model, so I can't verify if the same change is needed for the 7000 model.

To repeat Oli's answer, here is what I did: create a new file by running sudo nano /etc/udev/hwdb.d/61-keyboard-local.hwdb. Paste the following lines to the file (for the 4000 model):

keyboard:usb:v045Ep00DB*
 KEYBOARD_KEY_c022d=pageup
 KEYBOARD_KEY_c022e=pagedown

After editing the file, recompile the hwdb that udev uses:

sudo udevadm hwdb --update

Then replug the keyboard.