In my laptop (a Thinkpad), I use 3 mouse input devices: the laptop's
trackpoint (listed as a ps2 mouse), the laptop's touchpad (synaptics)
and an extra USB mouse I plug while on desk:
$ doas wsconsctl | fgrep mouse
mouse.type=synaptics
mouse.rawmode=0
mouse.scale=1472,5470,1408,4498,0,60,85
mouse.reverse_scrolling=0
mouse.tp.tapping=0,0,0
mouse.tp.scaling=0.182
mouse.tp.swapsides=0
mouse.tp.disable=0
mouse.tp.edges=0.0,5.0,0.0,5.0
mouse1.type=ps2
mouse1.reverse_scrolling=0
mouse2.type=usb
mouse2.reverse_scrolling=0
The X server recognizes the following devices:
$ xinput list
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ /dev/wsmouse0 id=7 [slave pointer (2)]
⎜ ↳ /dev/wsmouse id=8 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ /dev/wskbd id=6 [slave keyboard (3)]
In order for scrolling to work on the trackpoint, i need to emulate
scroll buttons while the middle button is pressed and the thinkpad's
red nub is moved.
$ cat ~/.xsession | fgrep xinput
xinput set-prop "/dev/wsmouse" "WS Pointer Wheel Emulation" 1
xinput set-prop "/dev/wsmouse" "WS Pointer Wheel Emulation Button" 2
xinput set-prop "/dev/wsmouse" "WS Pointer Wheel Emulation Axes" 6 7 4 5
That generates virtual scroll buttons but imposes a nasty restriction: I
cannot hold the middle mouse button. I can either press-and-release it
as a single quick action, or generate virtual wheel scrolls.
That affects not only the trackpoint, but the USB mouse as well. This
is bad, especially when playing some FPS games that requires me to move
the mouse while the middle button is held (say, moving the camera while
the rifle aim/sight is activated). To counteract it, I further emulate
the middle mouse button by simultaneously pressing the left and right
buttons; but that is a botch.
How can I configure each mouse separately?
Maybe I should make wscons list each mouse as different devices to the X
server. But I have no idea whether this is the solution nor how should
I do that.
Thanks,