Difference between revisions of "Template:Virtual Keyboard Installation"

From Waveshare Wiki
Jump to: navigation, search
Line 1: Line 1:
== '''Install Virtual Keyabord'''==
+
== Install Virtual Keyabord ==
 
1.  Install matchbox-keyboard <br />
 
1.  Install matchbox-keyboard <br />
 
<pre>
 
<pre>

Revision as of 08:26, 24 January 2018

Install Virtual Keyabord

1. Install matchbox-keyboard

sudo apt-get install update
sudo apt-get install matchbox-keyboard
sudo nano /usr/bin/toggle-matchbox-keyboard.sh

2. Copy the statements below to toggle-matchbox-keyboard.sh and save.

#!/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

3. Execute the commands:

sudo chmod +x /usr/bin/toggle-matchbox-keyboard.sh
sudo mkdir /usr/local/share/applications
sudo nano /usr/local/share/applications/toggle-matchbox-keyboard.desktop

4. Copy the statements to toggle-matchbox-keyboard.desktop and save.

[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

5. Execute commands as below. Note that you need to use "Pi " user permission instead of root to execute this command

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

6. Find the statement which is similar to below: (It maybe different in different version)

Plugin {
type = launchbar
Config {
Button {
id=lxde-screenlock.desktop
}
Button {
id=lxde-logout.desktop
}
}

7. Append these statements to add an button option:

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

RPILCD-INSTALL-KEYBOARD01.png

8. reboot your Raspberry Pi. If the virtual keyboard is installed correctly, you can find that there is a keyboard icon on the left of the bar

sudo reboot