P-Series Touchscreen Driver for X
-
Download the tarball and extract it to some
temporary directory.
tar xzvf fujitsu-xx.yy.tar.gz
Copy the file "fujitsu_drv.o" to the appropriate location
("/usr/X11R6/lib/modules/input").
Insert the lines below to the file "/etc/X11/XF86Config-4" or
"/etc/X11/xorg.conf".
Section "InputDevice"
Identifier "touchscreen"
Driver "fujitsu"
Option "Device" "/dev/ttyS0"
Option "DeviceName" "touchscreen"
Option "MinX" "82"
Option "MinY" "146"
Option "MaxX" "4036"
Option "MaxY" "3999"
Option "SendCoreEvents" "On"
EndSection
- Add the line below to the file "/etc/X11/XF86Config-4" or
"/etc/X11/xorg.conf" to the section "ServerLayout".
InputDevice "touchscreen" "CorePointer"
Since Xorg 7.2 there is always a default-mouse-pointer which will run simultaneously with evtouch if you do not prevent it from loading. It is extremely important that you add the following to your configuration. Otherwise you will get double click events and all kind of strange things.
-
Add the following new input-device to your xorg.conf:
Section "InputDevice"
Identifier "dummy"
Driver "void"
Option "Device" "/dev/input/mice"
EndSection
-
Add the following line your your "ServerLayout"-section:
InputDevice "dummy"
Now you have to enable the touchscreen by configuring the serial port which the touchscreen is connected to. This is done with the command setserial:
setserial /dev/ttyS0 port 0x0220 irq 4 autoconfig
This command has to be called each time before you start X. To make this happen automatically -- put it in a script. Since V0.6.3 the script stylus is contained in the tarball for this task.
- Copy the file "stylus" to the appropriate location ("/etc/init.d").
cp stylus /etc/init.d/
-
Now you have to make shure this script is called with the parameter "start" each time BEFORE X starts. For Debian based distributions you have to call:
update-rc.d stylus default 90
Button-Events
With the state-machine based code you can have the three types of button actions (button up, down, click) which are issued in different states of the state-machine. So the complete behaviour is configurable.
Have a look at
Libtouch to see which default-actions are hard-coded in the driver and what you have to do to change the default-behaviour.
If you are not confident with the default behaviour of your touchpanel you
can configure certain timers which change its behaviour.
| Option |
Description |
Default-Value
|
| TapTimer |
This timer starts when the state ENTER_MAYBE_TAPPED is
entered. When this timer expires a tap-event is issued and the state
changes to UNTOUCHED. |
90 ms |
| LongTouchTimer |
This timer is always started when the state TOUCHED
is entered. When the timer expires before you untouch the screen again the
state moves to LONGTOUCHED and on entering that state a longtouch-event is
issued.
If the screen was tapped and after that touched again
aproximately at the same location (+- MoveLimit) a ONEANDAHALF-Event is
issued. In this case the screen has also to be touched for LongTouchTimer
milli-seconds. |
160 ms |
| MoveLimit |
If the pen moves out of this radius a "mouse-press"-event
becomes impossible. Currently the move-limit is related to the RAW
coordinates sent by the touchscreen-device. |
180 |
| Rotate |
There are two valid values:CW -- Rotate the screen clockwiseCCW -- Rotate the screen counter-clockwise
Everything else will be treated as "no rotation".
|
no rotation |
| SwapX |
When set to 1 the X-axis is
swapped. This option is applied BEFORE the rotation-option.
|
false -- no swapping |
| SwapY |
When set to 1 the Y-axis is
swapped. This option is applied BEFORE the rotation-option.
|
false -- no swapping |
If you find bugs or if you have comment/wishes please send mail to lifebook@conan.de
Download
P-Series Touchscreen-Driver for X
This driver should work for XFree 4.x and Xorg 6.8.x and higher
Have a look at the CHANGELOG.