TS.CONF(5) | tslib | TS.CONF(5) |
ts.conf - Configuration file for tslib, controlling touch screens for embedded devices.
The idea of tslib is to have a core library that provides standard services, and a set of plugins to manage the conversion and filtering as needed.
The plugins for a particular touchscreen are loaded automatically by the library under the control of a static configuration file, /etc/ts.conf. /etc/ts.conf gives the library basic configuration information. Each line specifies one module, and the parameters for that module. The modules are loaded in order, with the first one processing the touchscreen data first. For example:
module_raw input
module variance delta=30
module dejitter delta=100
module linear
Latest versions of the Xorg tslib input driver use hal to configure the touchscreen within Xorg. Environment variables are only needed for the tslib commands.
TSLIB_TSDEVICE
Default when using ts_setup(): We try to open /dev/input/ts, /dev/input/touchscreen and /dev/touchscreen/ucb1x00 and on Linux, we then scan /dev/input/event* for the first device with property INPUT_PROP_DIRECT.
TSLIB_CONSOLEDEVICE
Default: /dev/tty
TSLIB_CALIBFILE
Default: /etc/pointercal
TSLIB_CONFFILE
Default; /etc/ts.conf.
TSLIB_FBDEVICE
Default: /dev/fb0.
TSLIB_PLUGINDIR
Default: /usr/lib/$triplet/ts0/ where triplet is the MultiArch path, e.g. arm-linux-gnueabi.
dejitter
Squared distance between two samples ((X2-X1)^2 + (Y2-Y1)^2) that defines the quick motion threshold. If the pen moves quick, it is not feasible to smooth pen motion, besides quick motion is not precise anyway; so if quick motion is detected the module just discards the backlog and simply copies input to output.
linear
Rotation of touch coorinates. 0=no, 1=CW, 2=UD, 3=CCW. Default: the screen-rotation that was used with ts_calibrate (-r option).
Interchange the X and Y co-ordinates -- no longer used or needed if the new linear calibration utility ts_calibrate is used.
Offset applied to the pressure value. Default: 0.
Factor to multiply the pressure value with. Default: 1.
Value to divide the pressure value by. Default: 1.
iir
numerator of the smoothing fraction. Default: 0.
denominator of the smoothing fraction. Default: 1.
pthres
Minimum pressure value for a sample to be valid. Default: 1.
Maximum pressure value for a sample to be valid. Default: INT_MAX.
debounce
drop events up to this number of milliseconds after the last release event. Default: 0.
skip
Number of events to drop after pressure. Default: 1.
Number of events to drop before release. Default: 1.
median
Number of samples to apply the median filter to. Default: 3.
invert
X-axis (horizontal) value around which to invert. Default: 0.
Y-axis (horizontal) value around which to invert. Default: 0.
lowpass
floating point values betwenn 0 and 1. Default: 0.4.
x or y minimum distance between two samples to start applying the filter. Default: 2.
variance
This is a greedy filter, e.g. it gives less samples on output than receives on input. There is no multitouch support for this filter.
Set the squared distance in touchscreen units between previous and current pen position (e.g. (X2-X1)^2 + (Y2-Y1)^2). This defines the criteria for determining whenever two samples are near or far to each other.
If the distance between previous and current sample is far, the sample is marked as potential noise. This doesn't mean yet that it will be discarded; if the next reading will be close to it, this will be considered just a regular quick motion event, and it will sneak to the next layer. Also, if the sample after the potential noise is far from both previously discussed samples, this is also considered a quick motion event and the sample sneaks into the output stream.
hardware support
module_raw | supported devices | interface | platforms | MT | how to enable |
input | all with Linux evdev drivers | any (driver) /dev/input/ | Linux, FreeBSD | yes | enabled by default |
arctic2 | IBM Arctic II | . | Linux, BSD, Hurd, Haiku | no | --enable-arctic2 |
collie | Sharp Zaurus SL-5000d/SL-5500 | . | Linux, BSD, Hurd, Haiku | no | --enable-collie |
corgi | Sharp Zaurus SL-C700 | . | Linux, BSD, Hurd, Haiku | no | --enable-corgi |
dmc_dus3000 | DMC DUS Series (DUS3000, ...) | UART | Linux | no | --enable-dmc_dus3000 |
dmc | DMC (others) | . | Linux, BSD, Hurd, Haiku | no | --enable-dmc |
galax | eGalax 100, 112, 210 | any (driver) | Linux, BSD | no | --enable-galax |
h3600 | Compaq IPAQ | . | Linux, BSD, Hurd, Haiku | no | --enable-h3600 |
mk712 | Hitachi Webpad | . | Linux, BSD, Hurd, Haiku | no | --enable-mk712 |
tatung | Tatung Webpad | . | Linux, BSD, Hurd, Haiku | no | --enable-tatung |
touchkit | Touchkit SAT4000UR | RS232 | Linux, BSD, Hurd | no | enabled by default |
ucb1x00 | UCB1x00 Touchscreens | . | Linux, BSD, Hurd, Haiku | no | --enable-ucb1x00 |
waveshare | Waveshare Touchscreens | /dev/hidrawX | Linux | no | enabled by default |
cy8mrln_palmpre | in Palm Pre/Pre Plus/Pre 2 | . | Linux | no | --enable-cy8mrln-palmpre |
one_wire_ts_input | FriendlyARM one-wire touch screen | . | Linux | no | --enable-one-wire-ts-input |
input_evdev | Linux evdev drivers (libevdev) | . | Linux | yes | --enable-input-evdev |