How to install Soft Keyboard

From LCD wiki
Jump to: navigation, search
语言选择(Other languages): 中文 English

This installation tutorial uses "2016-05-27-raspbian-jessie" version for testing.
If use wheezy or earlier image, then the step5 and step6 have different file paths, please refer to the virtual-keyboard official installation tutorial for specification.

Official reference address

1. Install the necessary files

sudo apt-get update
sudo apt-get install libfakekey-dev libpng-dev libxft-dev autoconf libtool

2.Install the matchbox-keyboard

git clone
cd matchbox-keyboard
(Note: "./" execution takes a few minutes, and would show as follows after running correctly; if it doesn’t show as follows, then need to check to see if there are error Popup Window prompt)

Soft Keyboard-01.png


sudo make
sudo make install

3. Install the shared data library for matchbox-keyboard

sudo apt-get install libmatchbox1

As following:

Soft Keyboard-02.png

4. Create a virtual keyboard startup script

sudo nano /usr/bin/

Paste the following, press Ctrl + X and Y, to save then exit

#This script toggle the virtual keyboard
PID=`pidof matchbox-keyboard`
if [ ! -e $PID ]; then
killall matchbox-keyboard
matchbox-keyboard -s 50 extended&

Add executable permission for the script above

sudo chmod +x /usr/bin/

5. Add script above to Start menu {{code|1= sudo nano /usr/share/applications/toggle-matchbox-keyboard.desktop

Paste the following content, press Ctrl + X and Y, to save then exit

[Desktop Entry]
Name=Toggle Matchbox Keyboard
Comment=Toggle Matchbox Keyboard

6. Create an icon on the taskbar (Note that in this step, must be "pi" user privileges, if you use administrator privileges, will not find the file)

nano ~/.config/lxpanel/LXDE-pi/panels/panel

7. Find the resembles similar to the following command (default content may be different in different Raspberry Pi versions)

Plugin {
Config {
    Button {
    Button {
    Button {
    Button {
    Button {

Add the following code to add an icon item

Button {

After modifying, would show as below:

Soft Keyboard-03.png

8. After modifying, run the following command and re-start the system; you will see a virtual keyboard icon in taskbar on the screen normally.

sudo reboot

P.S. Log into via SSH to see how to change the size of the virtual keyboard

DISPLAY=:0.0 matchbox-keyboard -s 50 extended
DISPLAY=:0.0 matchbox-keyboard -s 100 extended