Touchpad Trackball Utility

Maps a touchpad to a virtual trackball on Linux.

Inputs from a touchpad are used to control a virtual mouse device. Touching the pad and dragging is mapped straight to the virtual device. Dragging and releasing causes the trackball to be given momentum and keep moving for a few seconds. This functionality seems to already be available in Linux's Synaptics driver, under the name “coasting”, but I couldn't find a way to enable it on my machine.

Note that mouse buttons are not passed through in any way!

Building

Dependencies:

Source code (.zip, version 2025-08-16)

Run build.sh to build. This should produce an executable called `/tmp/build/main`.

Usage

Load the `uinput` kernel module to allow the program to create a virtual trackball device.

Make `/dev/uniput` writeable by this program by changing permissions or running the program as root. Warning: both of these are potential security issues!

Optionally, disable touchpads in X. This program does *not* disable the device it gets input from, so the two devices will fight if both are used as inputs to control the cursor.

Adding this to `/etc/xorg.conf` disables all touchpads if you're using X:

Running the program with no arguments causes it to find the first touchpad-like device in `/dev/input/` and use it.

You can also provide the path to a device file to choose a device.

Your touchpad should now have trackball emulation as long as the program is running!

License

GPL v3.

Copyright (c) Fudge 2025.

Proxied content from gemini://tilde.team/~fudge/touchpad-trackball/index.gmi (external content)

Gemini request details:

Original URL
gemini://tilde.team/~fudge/touchpad-trackball/index.gmi
Status code
Success
Meta
text/gemini; lang=en
Proxied by
kineto

Be advised that no attempt was made to verify the remote SSL certificate.