Seguindo este guia: link
Eu configurei um arquivo de configuração:
$ 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
Com base no seguinte 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
No entanto, não obtenho keypresses (ou altero em evtest
output) quando termino.
(Sim, eu fiz udevadm
hwdb --update
/ trigger
)