Logitech Marble Mouse Notes

Here are my notes for using a Marble Mouse with FreeBSD 12 and GNU/Linux. I describe two methods: one using moused, and another using Xorg. My mapping sets the little thumb button (right-hand orientation) plus ball movement to emulate X+Y scrolling

FreeBSD 12

With moused

This method has the benefit of working "out of the box", and one will have a cursor available on their console. However, horizontal scrolling is not available and middle-button emulation is only possible by simultaneously pressing the left and right buttons.


moused_port="/dev/ums0" # This is the USB mouse
moused_flags="-w 4 -V -H"

With Xorg

This method provides better features, at the cost of being more complicated. It also does not allow for new devices (keyboards or mice) to hotplug. This is the method I personally use with my workstation because moused doesn't play well with my Wacom tablet. It requires xmodmap as the user to remap the small button to middle-click. If you can't get this to work, be absolutely sure moused isn't running.




Section "ServerFlags"
	Option "AutoAddDevices" "false"

Section "InputDevice"
	Identifier "Mouse0"
	Driver "mouse"
	Option "Protocol" "Auto"
	Option "Device" "/dev/ums0"  # This is the USB mouse
	Option "Buttons" "9"
	Option "ZAxisMapping" "4 5"
	Option "XAxisMapping" "6 7"
	Option "EmulateWheel" "true"
	Option "EmulateWheelButton" "8"
	Option "Resolution" "500"
	Option "HorizontalScrolling" "true"


pointer = 1 8 3 4 5 6 7 2 9


With Xorg


Section "InputClass"
	Identifier "Marble Mouse"
	MatchProduct "Logitech USB Trackball"
	Driver "libinput"
	Option "ButtonMapping" "1 8 3 4 5 6 7 2 9"
	Option "ScrollMethod" "button"
	Option "ScrollButton" "8"
	Option "MiddleEmulation" "true"
Go home