It seems odd that it’s a middle button. I’m always trying to use it to click in menus and other places.
This works on the CM4 at least, not sure about the other options.
Anyway:
🙂 dsegel@uconsole:~ % xinput list
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ ClockworkPI uConsole Consumer Control id=7 [slave pointer (2)]
⎜ ↳ ClockworkPI uConsole Mouse id=9 [slave pointer (2)]
⎜ ↳ vc4 id=10 [slave pointer (2)]
⎜ ↳ vc4 id=11 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ axp20x-pek id=6 [slave keyboard (3)]
↳ ClockworkPI uConsole Keyboard id=8 [slave keyboard (3)]
↳ ClockworkPI uConsole Consumer Control id=12 [slave keyboard (3)]
↳ vc4 id=13 [slave keyboard (3)]
↳ vc4 id=14 [slave keyboard (3)]```
Get the name for the trackball. In this case, it’s “ClockworkPI uConsole Mouse”.
🙂 dsegel@uconsole:~ % xinput get-button-map "ClockworkPI uConsole Mouse" 1 2 3 4 5 6 7 8 9 10 11 12
The second number, 2, is the middle button on a mouse.
🙂 dsegel@uconsole:~ % xinput set-button-map "ClockworkPI uConsole Mouse" 1 1 3 4 5 6 7 8 9 10 11 12
Now it’s a left button.
Make it automatic by putting into your user cron:
🙂 dsegel@uconsole:~ % crontab -e
Add this line to your cron:
@reboot /usr/bin/xinput set-button-map "ClockworkPI uConsole Mouse" 1 1 3 4 5 6 7 8 9 10 11 12
Now it’ll run on every boot.