Menu

Home

shanneton

The recordtablet Wiki

Introduction

This software is a command-line tool to display or record the data related to the motion of either the pen or the finger on the device. Recordtablet capture the X events triggered by the movement. The data of the motion event are displayed on the standard output but they can also be redirected to a file (see the examples)

That tool can be useful to test and evaluate a graphic tablet or to record very precisely the movements of a finger or a pen (for scientific purposes for instance).

Installation

Recordtablet is developped with the Qt framework. Only the sources are available. So to install this tool you have to compile it.

You should have installed the development files of the Qt library and the devlopment version of the xinput library (libxi-dev)
You may also need the "xinput" tool in order to have the name of your device.

So uncompress the zip archive, go into the directory where the sources are and type

qmake
make

Preparation

Get the name of the device
Enter the command

xinput list

to get the name and ID of your device.

__ Set the device be a "floating" device __
In order to intercept the events of X server, the state of the device has to be "float". A floating device is not linked to any X display pointer. When a device is floating, it can not anymore control the motion of the mouse on the computer display for instance. In order to do that, you have to use the xinput command again.

For instance, if your device ID is 16, you have to enter the following command :

xinput float 16

If you display again the list of available X input devices, you get something like :

myprompt $ xinput list
 Virtual core pointer                      id=2    [master pointer  (3)]
    Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
    2.4GHz 2way RF Receiver                   id=11   [slave  pointer  (2)]
    DualPoint Stick                           id=13   [slave  pointer  (2)]
    AlpsPS/2 ALPS DualPoint TouchPad          id=14   [slave  pointer  (2)]
    Wacom Bamboo eraser                       id=17   [slave  pointer  (2)]
    Wacom Bamboo cursor                       id=18   [slave  pointer  (2)]
    Wacom Bamboo pad                          id=19   [slave  pointer  (2)]
 Virtual core keyboard                     id=3    [master keyboard (2)]
     Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
     Power Button                              id=6    [slave  keyboard (3)]
     Video Bus                                 id=7    [slave  keyboard (3)]
     Power Button                              id=8    [slave  keyboard (3)]
     Sleep Button                              id=9    [slave  keyboard (3)]
     Laptop_Integrated_Webcam_FHD              id=10   [slave  keyboard (3)]
     AT Translated Set 2 keyboard              id=12   [slave  keyboard (3)]
     Dell WMI hotkeys                          id=15   [slave  keyboard (3)]
 Wacom Bamboo stylus                       id=16   [floating slave]

You can see that the last line displays the name of my device (Wacom Bamboo stylus) and its ID with the "float" status.

Utilisation

Once you have compiled the sources, you should obtain a binary named "recordtablet".
The usage of recordtablet is :
recordtablet name_of_the_device

For instance, my device is named "Wacom Bamboo stylus", so the correct command is
recordtablet "Wacom Bamboo stylus"

The display of the data begins when you type the 's' character on the keyboard. To end the capture, you have to type the 'e' character.

To record the data in a file just redirect the standard output to the file using the '>' character :
__recordtablet "Wacom Bamboo stylus" > name_of_the file __

For instance, if you want to store the data in a text file named "data.txt", you have to enter the following command :
__recordtablet "Wacom Bamboo stylus" > data.txt __

Outputs

Recordtablet outputs a formatted stream of ascii characters. This stream does not include the button events. Recordtablet displays only the proximity and motion events.

proximity events : a proximity event is trigerred when the stylus is near the surface of the tablet. Motion events are generated only after a proximity ON event. Motion events are not more generated after a proximity OFF event (when the stylus leave the tablet).

motion events : the motion events are related to the variation of the displacements of the stylus the pressure of the stylus on the tablet. With a standard graphics tablet you get the (x,y) coordinates (in tablet units), the pressure, the inclination of the stylus.

In the output stream, each line corresponds to a sample. On a single line, the data are separated by a blank space.
The fields are typically the following :

  • the time in seconds
  • the movement number (determined by the proximity events)
  • the coordodinates of the tip of the stylus,
  • the pressure
  • the angle etc...

But be careful since it can depend on the device. With a Wacom Bamboo Touch tablet for instance, you do not have any pressure data.

Example of lines of data :

0.979328 1 12516 2180 0 0 0 -900
0.987650 1 12539 2175 9 0 0 -900
0.994838 1 12588 2165 9 0 0 -900
1.003213 1 12662 2149 9 0 0 -900
1.011213 1 12757 2128 9 0 0 -900
1.018904 1 12845 2104 14 0 0 -900
1.026896 1 12922 2079 0 0 0 -900
1.031252 1 12987 2051 4 0 0 -900
1.039245 1 13039 2022 0 0 0 -900
1.046930 1 13083 1992 4 0 0 -900
1.055250 1 13121 1963 4 0 0 -900
1.063252 1 13156 1937 4 0 0 -900
1.071256 1 13191 1913 0 0 0 -900
1.079255 1 13226 1891 4 0 0 -900
1.087253 1 13261 1871 4 0 0 -900
1.091242 1 13290 1850 4 0 0 -900
1.099247 1 13313 1828 4 0 0 -900
1.107245 1 13330 1805 0 0 0 -900
1.115245 1 13343 1780 4 0 0 -900
1.123251 1 13354 1751 0 0 0 -900
1.131250 1 13370 1715 4 0 0 -900
1.139249 1 13390 1674 0 0 0 -900
1.147216 1 13414 1633 0 0 0 -900
1.151246 1 13444 1593 0 0 0 -900
1.159247 1 13473 1561 4 0 0 -900
1.167251 1 13501 1536 0 0 0 -900
1.175251 1 13524 1516 4 0 0 -900

If the data are written in a file, they do not appear in the console.
Instead you should only see the 'stderr' output of recordtablet, something like :

recordtablet by Sylvain Hanneton (2012)
Any feedback is welcome
Please type the 's' key to start the acquisition...
and the 'e' key to end it...

Target device : Wacom Bamboo stylus
Connecting to X Server...
Trying to connect Wacom Bamboo stylus
Connected...
Connexion opened...
Device ID = 16
Events can be received...

Acquisition started
Acquisition stopped

Feedback

PLEASE let me know if your have troubles with that tool.

Project Admins: