| 1 |
Generic plug-in for accessing pen-based tablets via evdev |
| 2 |
|
| 3 |
To test, run the demo app from examples/widgets/tablet with the |
| 4 |
command-line argument -plugin EvdevTablet |
| 5 |
|
| 6 |
Known to work with 3rd generation Wacom Bamboo Pen & Touch. Recent |
| 7 |
tablets like this one may need an updated wacom kernel driver for |
| 8 |
kernels 3.2 and older. |
| 9 |
|
| 10 |
Supports x, y, pressure, pen & eraser pointer types, proximity enter, |
| 11 |
proximity leave. The additional advanced fields of QTabletEvent will |
| 12 |
not be utilized. |
| 13 |
|
| 14 |
Connecting the tablet will result in two input devices: one for finger |
| 15 |
touch and the tablet buttons, and another for pen input including the |
| 16 |
stylus buttons. This plugin cares about the latter only. For touch, |
| 17 |
try the evdevtouch plugin. |
| 18 |
|
| 19 |
The plugin generates QTabletEvents only. For compatibility with Qt 4, |
| 20 |
TabletPress, Move and Release are only sent when the stylus is |
| 21 |
touching the screen. |
| 22 |
|
| 23 |
TabletEnterProximity and TabletLeaveProximity are always sent to the |
| 24 |
QGuiApplication instance. Use an event filter (or subclass) to handle |
| 25 |
these. In proximity events most of the data (incl. position) will be |
| 26 |
left unspecified as these are mere indication of the fact that the |
| 27 |
stylus entered the range of the tablet. |
| 28 |
|
| 29 |
When running under X, it is likely that no events are received due to |
| 30 |
the input device being grabbed. A temporary workaround is to disable |
| 31 |
the device from X via |
| 32 |
xinput set-prop <device> <device enabled property> 0. |
| 33 |
|
| 34 |
|
| 35 |
TODO #1: Indicate motion when lifted but still in proximity. Needs new |
| 36 |
event types. |
| 37 |
|
| 38 |
TODO #1.1: Where to report ABS_DISTANCE? Needs a new QTabletEvent member |
| 39 |
(unless we hijack z). |
| 40 |
|
| 41 |
TODO #2: QKeyEvent from the stylus buttons (BTN_STYLUS, BTN_STYLUS2, |
| 42 |
but there are no suitable Qt::Key_* constants?) |
| 43 |
|
| 44 |
TODO #3: QKeyEvent in evdevtouch (or this plugin?) from tablet buttons |