Matchbox-keyboard is an on screen ‘virtual’ or ‘software’ keyboard which works well for small touchscreen TFTs connected to a Raspberry Pi.



Matchbox-keyboard also uses XML files to specify the layout of the keys, which makes it highly customizable.
The touchscreen used in the above video is a PiScreen.

1. Install prerequisite development files

2. Install and compile matchbox-keyboard

Installation of the shared matchbox libraries needs to be done after the installation of matchbox-keyboard.

3. Create toggle script to start or stop matchbox-keyboard

We will now create a script to toggle the keyboard on and off. And then add a menu item to access the script as well as add an icon to the task bar for easy access.



Create a new file;

And copy in the text below;

Now make it executable;

We will now add an item to the start menu.

Copy in this text;

To create an icon on the task bar, open up the LXDE panel config;

Find this section of config (it is near the bottom);

and change it to;


More Information

Matchbox-keyboard can be started from the command line with the below statement. This needs to be run from a command prompt within X which is running on the touch screen;

Alternately, if you have SSH’d in from another PC, use;

This will load the default keyboard layout, seen here;



Matchbox-keyboard can also resize the window with the -s integer argument. Integer is a value between 30%-100% of the screen width.
Here is the defualt keyboard layout loaded at 50% of screen width;



Matchbox-keyboard also supports custom keyboards, and there are a few loaded with the install into /usr/local/share/matchbox-keyboard/. It is very easy to build your own.