How to install Soft Keyboard

From LCD wiki
Revision as of 14:52, 19 May 2018 by Liang (talk | contribs)
Jump to: navigation, search
语言选择(Language): 中文 EN


How to install Soft Keyboard:

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 (English)http://ozzmaker.com/virtual-keyboard-for-the-raspberry-pi/

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 https://github.com/mwilliams03/matchbox-keyboard.git
cd matchbox-keyboard
./autogen.sh

(Note: "./ autogen.sh" 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-02.png Continue:

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/toggle-matchbox-keyboard.sh                

Paste the following, press Ctrl + X and Y, to save then 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 permission for the script above

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