How to Install Soft Keyboard

Elecrow edited this page May 8, 2017 · 6 revisions

This tutorial tests with "2017-04-10-Raspbian-Jessie-with-PIXEL" version, if you want to use wheezy or an earlier version of the image, there are differences in the fifth and sixth step file path, you can have a reference of virtual-keyboard on office installation tutorials

Step 1: Install the necessary files

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

Step 2: Install the virtual keyboard “matchbox-keyboard”

git clone https://github.com/Elecrow-keen/matchbox-keyboard.git
cd matchbox-keyboard
chmod +x autogen.sh
sudo ./autogen.sh

Note: "./autogen.sh" execution time needs about a few minutes,It will shows as picrtured after correct implementation. If not similiar as pictured after implementation, you need check if there are error tips image

Then execute:

sudo make
sudo make install

Step 3 : Shared library for installing virtual keyboard

sudo apt-get install libmatchbox1 -y

As follow: image

Step 4: Create a virtual keyboard to start the script

sudo nano /usr/bin/toggle-matchbox-keyboard.sh

Paste the below text and press ctr+x and Y, save and exit

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

Add executable permissions for the above script

sudo chmod +x /usr/bin/toggle-matchbox-keyboard.sh

Step 5: Add the script to the start menu

sudo nano /usr/local/share/applications/toggle-matchbox-keyboard.desktop

Paste the below text and press ctr+x and Y, save and exit

[Desktop Entry]
Name=Toggle Matchbox Keyboard
Comment=Toggle Matchbox Keyboard`
Exec=toggle-matchbox-keyboard.sh
Type=Application
Icon=matchbox-keyboard.png
Categories=Panel;Utility;MB
X-MB-INPUT-MECHANSIM=True

Step 6: Create icons On the taskbar (note that this steps must use "Pi" user rights, if with administrator privileges, you will not find this file)

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

Step 7: Find similiar command with the following (different raspberry version may have different default content)

Plugin {
  type=launchbar
  Config {
    Button {
      id=lxde-x-www-browser.desktop
    }
    Button {
      id=pcmanfm.desktop
    }
    Button {
      id=lxterminal.desktop
    }
    Button {
      id=wolfram-mathematica.desktop
    }
    Button {
      id=wolfram-language.desktop
    }
  }
}

Add the following code to add an icon item

Button {
    id=/usr/local/share/applications/toggle-matchbox-keyboard.desktop
    }

The following picture are the effect after Modification image

Step 8: Execute the following command and restart after modification,if successfully, you can see a virtual keyboard Icon on the taskbar of screen.

sudo reboot
Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.