Datasheet

Gesture Input
With the PiTFT touchscreen and xstroke you can enter text in applications by drawing simple character gestures on the
screen! Check out the video below for a short demonstration and overview of gesture input with xstroke:
Installation
Unfortunately xstroke hasn't been actively maintained for a few years so there isn't a binary package you can directly
install. However compiling the tool is straightforward and easy with the steps below. Credit for these installation steps
goes to mwilliams03 at ozzmaker.com.
First install a few dependencies by opening a command window on the Pi and executing:
Now download, compile, and install xstroke by executing:
If the commands above execute successfully xstroke should be installed. If you see an error message, carefully check
the dependencies above were installed and try again.
Once xstroke is installed you will want to add a couple menu shortcuts to start and stop xstroke. Execute the following
commands to install these shortcuts:
Usage
To use xstroke I highly recommend using a plastic stylus instead of your finger. Also calibrate the touchscreen for X-
Windows so you have the best control over the cursor possible.
Start X-Windows on the PiTFT and open the LXDE menu by clicking the icon in the lower left corner. Scroll up to the
Accessories menu at the top and notice the new XStroke and XStroke Kill commands.
Click the XStroke menu option to start xstroke. You should see a small pencil icon appear on the bottom right side of
the screen. The pencil icon means xstroke is running, however by default it's not yet looking for gesture input.
Open an application that takes text input, such as LXTerminal. To enable gesture input click the xstroke pencil icon.
sudo apt-get -y install build-essential libxft-dev libxpm-dev libxtst-dev
cd ~
wget http://mirror.egtvedt.no/avr32linux.org/twiki/pub/Main/XStroke/xstroke-0.6.tar.gz
tar xfv xstroke-0.6.tar.gz
cd xstroke-0.6
./configure
sed -i '/^X_LIBS = / s/$/ -lXrender -lX11 -lXext -ldl/' Makefile
make
sudo make install
wget https://github.com/adafruit/PiTFT_Extras/raw/master/xstroke.desktop
wget https://github.com/adafruit/PiTFT_Extras/raw/master/xstrokekill.desktop
sudo cp xstroke*.desktop /usr/share/applications/
Don't use a ballpoint pen or sharp metal stylus as it could scratch or damage the touchscreen!
© Adafruit Industries
https://learn.adafruit.com/adafruit-pitft-28-inch-resistive-touchscreen-display-raspberry-
pi
Page 64 of 70