s i s t e m a o p e r a c i o n a l m a g n u x l i n u x | ~/ · documentação · suporte · sobre |
Next
Previous
Contents
5. Tablets with XFree 3 and XFree 4
5.1 Required XFree Version
Minimum XFree version should be 3.3.3.1 because this version has extended XInput support, the second side switch works now and the blocking mouse effect has been fixed. If you must use any prior version, XInput support should be available since 3.1.2.d. XInput support in XFree is configured basically in a file called XF86Config. In most cases the XF86Config file is located in /etc or in /etc/x11. I will show now two very short configuration sections, the first works with XFree 3, the other is for XFree 4. I will explain then what can be changed and why this is needed. 5.2 Sample XF86Config snippet for XFree 3
5.3 Sample XF86Config snippet for XFree 4
5.4 Syntax Difference between XFree 3 and XFree 4
Please notice the different syntax between
XFree 3 and XFree 4: Because the usage can be seen from the above examples, this difference will be considered as clear for the rest of the document.
5.5 Section Module
XInput support in XFree is reached due to the use of modules. The wacom device driver module file for XFree 3 is called xf86Wacom.so, for XFree 4 the filename changed to wacom_drv.o. The files are located usually in /usr/X11R6/lib/modules/ or in /usr/X11R6/lib/modules/input. We have to specify in the "Module" section that we want to load this driver (look at above snippets): XFree 3: Load "xf86Wacom.so"
This has to appear only once per XF86Config file.
5.6 Device Type (XF3) and Type (XF4)
The penpartner and graphire products simply recognize the type of a device, but they can not distinguish them. For example, you can not use two different pens, say, one configured red and one configured blue - all what these products say is: "I found a pen tip on my surface", or "I found an Eraser on my surface", or "I found a mouse on my surface".
XInput maps the device types to devices, these device types are later
specified in XF86Config. For XFree 3 this is a subsection in the
section XInput, for XFree 4 this goes to individuell InputDevice sections.
As you can see from above examples, device types are specified with the keyword "Devicetype" in XFree 3 and with Option "Type" in XFree 4.
5.7 DeviceName (XF3) and Identifier (XF4)
You must give every configured device a unique name. This name will be used later in your program to talk to that device. You can choose this name free. This statement is mandantory. In XFree 3 you will use the "Devicename" keyword, in XFree 4 you will use the Identifier "name" keyword. Please notice that Identifier is not an Option !
5.8 Port (XF3) and Device (XF4)
XInput wants to know at which serial port this device can be found. This allows me to use two different tablets at the same time, for example a graphire connected to /dev/ttyS0 and a penpartner connected to /dev/ttyS1. USB is treated as a serial line too, so this statement is mandantory. If you connect your product to the USB, you have to specify this with Option USB.
5.9 DebugLevel
This statement controls how verbose the Wacom driver is. The Level goes from 0 to 10. If this statement is not given, DebugLevel 0 is used, which logs the very less. Example (XFree 3):
Example (XFree 4):
5.10 Serial Num (intuos series only)
The intuos product is more efficient than penpartner and graphire because it can distinguish many devices of the same type. This means that it is now possible to use two pens, one configured red and one configured blue. As you see, the use of device types is not enough information to handle different pens. Therefore, each intuos device, be it a pen, ink pen, mouse, or whatever has a serial number, which you can specify to aid XInput in resolving the right device. This would look like: Example (XFree 3):
Example (XFree 4):
It should be said that combined input devices like pens have only one serial number. The driver uses the serial number it gets to recognize one specific pen and the device type to distinguish the tip of that specific pen from its eraser.
How to find out the serial number of a device
You should get a list of your different numbers.
Serial Num - Example of what has been logged (XFree 3)
(serial_num is in Line 4 Word 2).
5.11 Mode absolute, Mode relative
If you set a device in mode absolute, this means, that the active area of the tablet will be mapped to the screen. Every time you go down to the tablet at the same point with an absolute device the pointer will appear at the same point of the screen.
If you set a device in mode relative, you will get the well known behavior of a mouse. This means, that if you take the mouse off from the surface, move it and go down again, the pointer does (ideally) not move.
Example (XFree 3):
Example (XFree 4):
5.12 Device Modes Extension, Core, AlwaysCore
XFree knows two pointers: one with only the standard features (buttons, moving-capabilities), which is used for selecting menus, text, clicking buttons and doing other controlling stuff. This is the Core Device. The other pointer is used by applications which want more information, like
pressure and tilt.
Starting with version 3.3.3.1, the Statement AlwaysCore tells the driver that it should send both types of events.
If you do not specify Alwayscore in your XF86Config, then this device is initially used as extension device, this means it is usable only in applications but you can not control the menus of your window manager with it.
If Alwayscore is given, then your device acts as core pointer (in addition to the mouse) as well as it sends tilt and pressure information to applications which opened the device in extension mode. You can configure two different logical devices, one in Core-Mode and one in
Extension-Mode, to the same physical device. Example (XFree 3):
For XFree 4, this is not an option in the InputDevice section, it goes to the Serverlayout section and can be one of: AlwaysCore / SendCoreEvents or CorePointer: Example (XFree 4):
5.13 HistorySize
This statement sets the buffer size that is used to cache motion events. Example (XFree 3):
Example (XFree 4):
5.14 Suppress
This statement specifies how many units the device must move before the driver moves the pointer. This can be necessary if very large resolutions are used. Example (XFree 3):
Example (XFree 4):
5.15 TiltMode (XF3) and Tilt (XF4)
This works only with intuos series tablets. Example (XFree 3):
Example (XFree 4):
5.16 MaxX, MaxY, MaxZ (since alpha 20)
Max[axis] limits / owerwrites the max[axis] values normaly retrieved from the tablet. More or less developer stuff.
5.17 ResolutionX, ResolutionY, ResolutionZ (since alpha 20)
Resolution[axis] presets the resolution[axis] values normaly retrieved from the tablet. More or less developer stuff.
5.18 TopX, TopY, BottomX, BottomY Statements
These four statements allow to reduce the active area of the tablet. My intuos
A4 oversize, for example, is so big that you can not do painting work with it
because the ways of the pen are too long. I use these four Statements to tell
the driver that it should map only the lower left quarter of the tablet to the
screen.
Example (XFree 3):
Example (XFree 4):
Getting the maximal X, Y Values, current configuration, and the resolutionIf you use the above four statements, you sometimes want to make some calculations on the size and position of the rectangle to be defined. Often the maximal tablet coordinates and the resolution are needed for this. To get these values, start your server: X 2>t. Kill the X-Server (usually Ctrl+Alt+Backspace) and do a grep "X=" t .You should get back the values in question.
Getting Resolution - Example of what has been logged
5.19 KeepShape
This option uses the TopX, TopY statements (or their built in defaults, if omitted) and adjusts the BottomX, BottomY statements so that
Any given BottomX, BottomY statement is ignored, because these values will be calculated. Example (XFree 3):
Example (XFree 4):
5.20 ThresholdThis is available since alpha 16 and is used to control the minimum pressure that is needed to detect that a tool is pressed on the surface. It works with intuos and graphire. Please note that the integer value has to be coded as String, unlike all other integer values. Example (XFree 3):
Example (XFree 4):
5.21 USB (since alpha 20)
USB tells the driver that the serial line is the usb port. This needs a Kernel 2.4 with usb enabled. Alpha 20 driver only supports absolute devices. Please read the Wacom-USB-mini-HOWTO by Arnauld Claden for more information on USB setup.
Next Previous Contents |