Execute sudo evtest
No device specified, trying to scan all of /dev/input/event*
Available devices:
/dev/input/event0: Lid Switch
/dev/input/event1: Power Button
/dev/input/event2: Sleep Button
/dev/input/event3: Power Button
/dev/input/event4: AT Translated Set 2 keyboard
/dev/input/event5: Video Bus
/dev/input/event21: Kingsis Peripherals Evoluent VerticalMouse 4
Select the device event number [0-27]: 21
Select your device from the list, then click the mouse button you wish to disable and observe the output:
Event: time 1712048987.316403, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90004
Event: time 1712048987.316403, type 1 (EV_KEY), code 275 (BTN_SIDE), value 1
Event: time 1712048987.316403, -------------- SYN_REPORT ------------
Event: time 1712048987.482414, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90004
Event: time 1712048987.482414, type 1 (EV_KEY), code 275 (BTN_SIDE), value 0
Note the device name (trailing wildcards can be used) and the MSC_SCAN
value,
then add a rule to /etc/udev/hwdb.d/61-evdev-local.hwdb
Execute sudo systemd-hwdb update
, and finally unplug the device and then plug it back in again.