tslib logo

C library for filtering touchscreen events

tslib is a cross-platform library that provides access to touchscreen devices and the ability to apply filters to their input events.

Supports...

On Linux and FreeBSD it supports all modern devices using input event drivers and includes multitouch support.

Furthermore it supports the Palm Pre's CY8MRLN, UCB1x00, Sharp Zaurus sl-c7x0 and sl-5500/5000d, HP / Compaq iPaq H3600 and DMC, DMC DUS3000 Series, Hitachi Webpad, IBM Arctic II, Tatung Webpad, eGalax 0112, 210 and 0100, Waveshare and more, in part for other host platforms too.

What is tslib used for?

tslib is used to access touch screen devices, in case the operating system doesn't provide driver support. It may instead also only be used to optimize the touch user experience by applying mathematical filters in any number or order. The libts library is highly configurable and portable. tslib includes tools to calibrate, test and use the library. (Via ts_uinput the app or toolkit gets to use the usual evdev input device with filtered touchscreen events). It is well suited for embedded devices and used in many commercial products. tslib includes documentation on how to use it. Compared to libinput tslib is more like a box of legos. tslib can be used together with libinput, providing a filtered device for libinput.

Download tslib

tslib only provides source archives. The latest release is version 1.23 including libts library version 0.10.5, released on the 20th of Feb 2024. Get it from our release page (mirror).

tslib is free software

The library is available under the LGPLv2 license. Check out the code at our git repository (mirror). Feel free to contribute yourself and join our mailing list.

Who makes tslib?

tslib exists thanks to various contributors from companies across the world and is open to your input. It was originally written by Russel King in 2001 and is actively maintained.

Consider donating

tslib is largely developed and maintained by Martin in his spare time. If you use tslib, please help maintaining it by donating.