Wacom is a company which produces high quality pen tablets and touchscreens. The tablets are a number one choice for Linux users since they are well supported. The Linux Wacom project provides an high quality driver and the userland tool
xsetwacom to change the settings of the tablet such as button keys or pressure sensitivity.
After reading some reviews, I decided to buy an Intuos4 M tablet for image manipulation with the GIMP. One of the reasons to choose this tablet was that it has eight buttons to which arbitrary key strokes are assignable. Each button has a little LED display besides it, which can be used to display the button assignment as a text or an icon.
After connecting the tablet to my computer (running Debian), I was able to configure the buttons with
xsetwacom. However, there was no possibility to set the LED displays. The consultation of the xsetwacom documentation was fruitless. So I searched the developer’s mailing list and found a post which contained a piece of code to access the LED displays. Unfortunately, the code did not work for me, but it provided some useful information on accessing the tablet. The self-imposed challenge was to develop a little C++ application to set to LED displays.
The main features of the application are:
- The application uses libusb to communicate with the tablet.
- Images are converted to an appropriate format using the Magick library. This is, you can download a png/jpg image directly to the tablet, if the image has the appropriate size.
- The application contains an icon library. These icons can be used directly for configuration the tablet display. A bunch of common icons are included in order to use without generating appropriate images.
The remaining part of this post is a little howto covering the setup and usage of the application.
Building the application from source
- In order to compile the source code, the development packages of libusb and Magick++ libraries must be present on the system. Furthermore, g++ and make.are mandatory. Under Debian Squeeze, the respective packages can be installed with the following command:
sudo apt-get install g++ make libusb-1.0-0-dev libmagick++-dev