Logitech Trackman Marble and scroll wheel emulation

Logitech Trackman Marble is trackball with four buttons. There is very nice instruction for configuring this device for Arch Linux, but this does not work directly on FreeBSD.

As says the Handbook:
In recent Xorg versions, the InputDevice sections in xorg.conf are ignored in favor of the autodetected devices.
It is possible to restore the old behavior but this broke something in X and did not work for me.

I got scrolling to work by the following steps:

1. HAL should be enabled. From X11 Configuration:
The sysutils/hal and devel/dbus ports are installed as dependencies of x11/xorg, but must be enabled by the following entries in the /etc/rc.conf file:
Code:
hald_enable="YES"
dbus_enable="YES"
These services should be started (either manually or by rebooting) before further Xorg configuration or use is attempted.

2. Create a trackball configuration file for hald called 11-mousewheel.fdi and saved in the /usr/local/etc/hal/fdi/policy directory. This file should contain the following lines:
Code:
<?xml version="1.0" encoding="ISO-8859-1"?>
<deviceinfo version="0.2">
  <device>
    <match key="info.capabilities" contains="input.mouse">
      <merge key="input.x11_options.Buttons" type="string">9</merge>
      <merge key="input.x11_options.Emulate3Buttons" type="string">true</merge>
      <merge key="input.x11_options.EmulateWheel" type="string">true</merge>
      <merge key="input.x11_options.EmulateWheelButton" type="string">8</merge>
      <merge key="input.x11_options.EmulateWheelTimeout" type="string">200</merge>
      <merge key="input.x11_options.XAxisMapping" type="string">6 7</merge>
      <merge key="input.x11_options.ZAxisMapping" type="string">4 5</merge>
    </match>
  </device>
</deviceinfo>
I wanted to put in this file also option for button mappings by adding line:
Code:
<merge key="input.x11_options.ButtonMapping" type="string">1 8 3 4 5 6 7 2 2</merge>
but this did not work.

I configured button mapping with x11/xinput by adding following line to .xinitrc file in user home directory:
Code:
xinput --set-button-map 'USB Trackball' 1 8 3 4 5 6 7 2 2
This line should be before the line that executes the window manager. If it is not the last line in file, then it is probably OK.

In my case the device name is 'USB Trackball', if this does not work, then list of the device names can be found out by executing the command
Code:
xinput list

The previous steps should configure the trackball to scroll with left small button, left and right small buttons both give middle click.

For the meanings of options and possible modifications look to Arch Linux instruction and XInput: Scroll-Wheel Emulation on a 4-button Marble Mouse.
 
Back
Top