In Ubuntu 16.04, this worked fine for evdev config for my 3m Ergo Mouse to emulate scroll wheel by holding down the 'middle' button. It no longer works in Ubuntu 18.04.
At /usr/share/X11/xorg.conf.d/42-middle-mouse-scrolling.conf -rw-r--r-- 1 root root 395 Feb 23 2017 42-middle-mouse-scrolling.conf
Section "InputClass"
Identifier "Middle Mouse Button Scrolling"
Driver "evdev"
MatchProduct "Optical Mouse"
MatchDevicePath "/dev/input/event*"
Option "EmulateWheel" "true"
Option "EmulateWheelButton" "2"
Option "XAxisMapping" "6 7"
Option "YAxisMapping" "4 5"
EndSection
After adding that I restarted.
In Ubuntu 18.04 this no longer works. So I tried this to find more information:
xinput --list
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ Forward USB Optical Mouse id=10 [slave pointer (2)]
⎜ ↳ SynPS/2 Synaptics TouchPad id=15 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Video Bus id=7 [slave keyboard (3)]
↳ Power Button id=8 [slave keyboard (3)]
↳ Sleep Button id=9 [slave keyboard (3)]
↳ Chicony USB2.0 Camera: Chicony id=11 [slave keyboard (3)]
↳ HID 05f3:0007 id=12 [slave keyboard (3)]
↳ HID 05f3:0007 id=13 [slave keyboard (3)]
↳ AT Translated Set 2 keyboard id=14 [slave keyboard (3)]
And the name of the input is still the same. I tried the above config MatchProduct with the full name 'Forward USB Optical Mouse' as well.
I then tried sudo evtest
to see the event:
Event: time 1533888912.632951, -------------- SYN_REPORT ------------
(3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ Forward USB Optical Mouse id=10 [slave pointer (2)]
⎜ ↳ SynPS/2 Synaptics TouchPad id=15 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Video Bus id=7 [slave keyboard (3)]
↳ Power Button id=8 [slave Event: time 1533888912.729025, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90003
And from that also tried changing to Option "EmulateWheelButton" "4"
.
I'm hoping someone knows the difference between how Ubuntu 16 and Ubuntu 18 work for xorg or can spot something I have done wrong.