Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

How to install Soft Keyboard

From LCD wiki
Revision as of 19:17, 8 December 2020 by Liang (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

语言选择

Languages

➤中文
➤EN



How to install Soft Keyboard

This installation tutorial uses "2020-08-20-raspios-buster-armhf" version for testing.
If use earlier image, then the step6 and step7 maybe different, please refer to the virtual-keyboard official installation tutorial for specification.

Official reference address 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)

Continue:

sudo make
sudo make install

3. Install the shared data library for matchbox-keyboard

sudo apt-get install libmatchbox1

As following:

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

5. Add script above to Start menu

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
Exec=toggle-matchbox-keyboard.sh
Type=Application
Icon=matchbox-keyboard.png
Categories=Panel;Utility;MB
X-MB-INPUT-MECHANSIM=True


6. Restart the system

sudo reboot


7. Add virtual keyboard to taskbar

Right click on the taskbar










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