3

Following this guide: http://www.vxnick.com/blog/2014/10/binding-extra-mouse-buttons-on-linux/

I've set up a config file:

$ lsusb | grep G500
Bus 006 Device 007: ID 046d:c068 Logitech, Inc. G500 Laser Mouse
$ cat /etc/udev/hwdb.d/70-g500.hwdb 
keyboard:usb:v046DpC068*
  KEYBOARD_KEY_90009=9
  KEYBOARD_KEY_9000a=8
  KEYBOARD_KEY_90006=0

Based on the following evtest output:

Event: time 1422711060.272136, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90009
Event: time 1422711060.272136, type 1 (EV_KEY), code 280 (?), value 1
Event: time 1422711060.272136, -------------- EV_SYN ------------
Event: time 1422711060.432134, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90009
Event: time 1422711060.432134, type 1 (EV_KEY), code 280 (?), value 0
Event: time 1422711060.432134, -------------- EV_SYN ------------
Event: time 1422711061.461191, type 4 (EV_MSC), code 4 (MSC_SCAN), value 9000a
Event: time 1422711061.461191, type 1 (EV_KEY), code 281 (?), value 1
Event: time 1422711061.461191, -------------- EV_SYN ------------
Event: time 1422711061.628125, type 4 (EV_MSC), code 4 (MSC_SCAN), value 9000a
Event: time 1422711061.628125, type 1 (EV_KEY), code 281 (?), value 0
Event: time 1422711061.628125, -------------- EV_SYN ------------
Event: time 1422711062.725119, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90006
Event: time 1422711062.725119, type 1 (EV_KEY), code 277 (BTN_FORWARD), value 1
Event: time 1422711062.725119, -------------- EV_SYN ------------
Event: time 1422711062.902137, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90006
Event: time 1422711062.902137, type 1 (EV_KEY), code 277 (BTN_FORWARD), value 0

And yet I get no keypresses (Or change in evtest output) when I'm done.

(Yes I've done udevadm hwdb --update/trigger)

0

I'm going through the same thing with a G600 and, after creating the hwdb file, I had to run (as root):

udevadm hwdb --update
udevadm control --reload

and then I had to unplug/replug the mouse. If that doesn't work, I'd suggest removing one of the space in front of each KEYBOARD_KEY lines in your configuration file. Unfortunately, I don't have a link but I did see another post while troubleshooting saying that there should be exactly one space in front of those lines. I had been using no spaces and adding only one fixed the hwdb not updating.

  • I was using 2 spaces in front of KEYBOARD_KEY but I reduced it to 1 and it's still not working. Oh dear. – J V Mar 23 '15 at 18:15
  • Does the timestamp on /etc/udev/hwdb.bin change after you update? – William Everett Mar 24 '15 at 19:30
  • @JV You should also call udevadm trigger after the udevadm hwdb --update. And any line that starts with more than one space is silently ignored for future reference. – Centimane Jun 24 '15 at 14:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.