Node:XFree 4.0,
Next:Generic X Configuration,
Previous:XFree 3.3,
Up:XFree Configuration
XFree 4.0
In order to use a Gunze device with XFree 4.0 you need to add an
InputDevice
section to your XF86Config
. The following example shows
how it looks like. The options that are shown commented are not
implemented in this version of the module, and are ignored
if specified.
Section "InputDevice"
Identifier "Touchscreen0"
Driver "gunze"
Option "Device" "/dev/ttyS0"
#Option "DeviceType" "serial"
Option "BaudRate" "9600"
#Option "CalibrationFile" "/etc/gunzets.calib"
Option "Smoothness" "9"
Option "TappingDelay" "0"
Option "JitterDelay" "50"
Option "DebugLevel" "0"
Option "Res12Bit" "False"
Option "SendCoreEvents"
EndSection
Moreover, you need to add an InputDevice
line in the
ServerLayout
section. After the addition,
the section will most likely look like this:
Section "ServerLayout"
Identifier "Simple Layout"
Screen "Screen 1"
InputDevice "Mouse1" "CorePointer"
InputDevice "Keyboard1" "CoreKeyboard"
InputDevice "Touchscreen0"
EndSection
Note that if your system has no mouse device, you can remove
the InputDevice "Mouse1"
line and add "CorePointer"
to the touch screen line.
The meaning of individual options is as follows:
Identifier "Touchscreen0"
-
The identifier string is mandatory, and appears, literally, in
the
InputDevice
directive within the ServerLayout
section that is usually found at the end of the configuration file.
Driver "gunze"
-
The name of the driver is mandatory. It is used to load the
associated module. In this case the file
gunze_drv.o
.
Option "Device" "/dev/ttyS0"
-
The device name is mandatory. It states where input data is
collected from. It can be a serial port, a ps2 port or the
USB device created by the
gunzets
device driver.
Option "DeviceType" "serial"
-
The device type specification is not currently supported. If
the option is present it is ignored. The actual device type is
retrieved from the device name: any device name that
includes the string "tty" is assumed to be a serial port,
other devices are assumed to speak the PS/2 protocol.
Option "BaudRate" "9600"
-
The transmission rate for serial ports. It defaults to 9600
and is ignored for non-serial input devices.
Option "CalibrationFile" "/etc/gunzets.calib"
-
The option is not currently implemented.
Option "Smoothness" "9"
-
The smoothness of the pointer. The default value is 9. The greater
the value the smoother the motion. If you need to do handwriting
or similar "fast" interaction, you should set the smoothness to 0.
Option "TappingDelay" "0"
-
Optional selection of tapping mode.
By default (tapping delay set to 0), any touch
event is reported as a button press. In tapping mode the first
touch event is used to move the pointer, and button press is
only reported when the user taps on the device. If the delay,
measured in milliseconds, between pen-up and pen-down is greater
than the selected value, the pen-down even is considered motion.
I personally
prefer tapping mode when testing the device, as it allows me
to use the common point-and-click semantics instead of
click-only; this is especially true if your touchscreen is not
placed over the image but in side of it (as you guess, I do that).
Option "JitterDelay" "50"
-
The debouncing time lapse, measured in milliseconds.
If a pen-down event occurs immediately after pen-up (within this
time lapse), then both events are discarded. Debouncing has
been contributed by Chris Howe <chris@howeville.com>, and defaults
to 50ms.
Option "DebugLevel" "0"
-
The level of messages spit out by the driver. The directive
is optional and it defaults to 0.
Option "Res12Bit" "False"
-
The boolean option states whether your panel
reports data with 12 bits of resolution (i.e., as numbers
in the 0-4095 range). The default is 10 bits (0-1023).
12-bit support is implemented by discarding the lowest two bits,
and has been contributed by Atsushi Nemoto.
Option "SendCoreEvents"
-
The directive instructs X to use the touch screen as a core
input device (like the main mouse). This module can currently
only work as a core device.