Libtouch
Libtouch is a state-machine based library which simulates different mouse-button-actions with a touchscreen-pen -- or your finger.
Default behaviour
The table below shows the default-behaviour when no further configuration by the user is used.
| State-Name |
Description |
Default-Action
|
| MAYBETAPPED |
If you tap with the pen on the screen the default-action is issued. If you touch the screen again immediately the next state is entered.
|
left mouse-button click |
| LONGTOUCHED |
If you touch the screen for a long time without moving the pen too much this state is entered and the default-action is issued.
|
left mouse-button down |
| ONEANDAHALFTAP |
This state is entered if you tap the screen and immediately
after that touch the same place on the screen again without moving the pen on
the screen too much.
|
right mouse-button down |
Changing the default-behaviour
If you tap the screen, the state-maching will go to the state MAYBETAPPED. Which button-action in this state will be issued by the driver is completely configurable.
If I have time I will document the complete state-machine here, but at the moment you can only configure the button-actions of the states described in the table above. For each state you configure, you have to tell the driver what you want to do (Button down, up or click) and with wich button (1, 2, 3, 4, ...).
Xorg.conf-options
| Option |
Description |
| maybetapped_action |
Button-action to issue when the user taps the screen. |
| maybetapped_button |
Button to use (1, 2, ...). |
| longtouch_action |
Button-action to issue when the user touches the screen for a long time. |
| longtouch_button |
Button to use (1, 2, ...). |
| maybetapped_action |
Button-action to issue when the user taps the screen and then touches approximately the same location for a long time. |
| maybetapped_button |
Button to use (1, 2, ...). |
Examples
Here is an example of what you have to put into your xorg.conf to let the driver do a right button down on a LONGTOUCH:
Option "longtouch_action" "down"
Option "longtouch_button" 3
Here is an example of what you have to put into your xorg.conf to let the driver do a middle button click when doing a tap:
Option "maybetapped_action" "click"
Option "maybetapped_button" 2
Each of the configurable states can issue one of the following button actions:
| Button-Action |
Description |
| down |
Button down |
| up |
Button up |
| click |
Button click |