Difference between revisions of "How to install Soft Keyboard"

From LCD wiki
Jump to: navigation, search
 
(26 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{| class="wikitable" border="1" style=" background-color: white;"
+
{{lan
|- style="background-color: #f2f2f2;text-align:center"
+
    |cn=http://www.lcdwiki.com/zh/%E5%A6%82%E4%BD%95%E5%AE%89%E8%A3%85%E8%99%9A%E6%8B%9F%E9%94%AE%E7%9B%98(CN)
| style="color: #ff0000; font-weight:bold;" align="center" |语言选择(Language):
+
    |en=http://www.lcdwiki.com/How_to_install_Soft_Keyboard                                                    }}
| style=" font-weight:bold;" align="center" |[http://www.lcdwiki.com/zh/%E5%A6%82%E4%BD%95%E6%97%8B%E8%BD%AC%E6%98%BE%E7%A4%BA%E5%92%8C%E8%A7%A6%E6%91%B8(%E7%94%B5%E5%AE%B9%E8%A7%A6%E6%91%B8) 中文] 
+
<br/>
| style=" font-weight:bold;" align="center" |[http://www.lcdwiki.com/How_to_modify_the_display_orientation-CTP(En) EN]  
+
== <font color="blue">'''How to install Soft Keyboard'''</font> ==
|}
+
This installation tutorial uses "2020-08-20-raspios-buster-armhf" version for testing. <br/>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/
  
== <font color="blue">'''How to install Soft Keyboard''':</font>  ==
+
'''1. Install the necessary files'''
 
+
{{code|1=
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
 
<pre style="border: 1px dashed black;color:black;width: 50%">
 
 
sudo apt-get update
 
sudo apt-get update
 
sudo apt-get install libfakekey-dev libpng-dev libxft-dev autoconf libtool
 
sudo apt-get install libfakekey-dev libpng-dev libxft-dev autoconf libtool
</pre>
+
}}
 
+
'''2.Install the matchbox-keyboard'''
2.Install the matchbox-keyboard
+
{{code|1=
<pre style="border: 1px dashed black;color:black;width: 100%">
 
 
git clone https://github.com/mwilliams03/matchbox-keyboard.git
 
git clone https://github.com/mwilliams03/matchbox-keyboard.git
 
cd matchbox-keyboard
 
cd matchbox-keyboard
 
./autogen.sh
 
./autogen.sh
</pre>
+
}} (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)
(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)
+
 
[[File:Soft_Keyboard-02.png|750px]]
+
[[File:Soft_Keyboard-01.png]]
 +
 
 
Continue:
 
Continue:
<pre style="border: 1px dashed black;color:black;width: 50%">
+
{{code|1=
 
sudo make
 
sudo make
 
sudo make install
 
sudo make install
</pre>
+
}}
3. Install the shared data library for matchbox-keyboard
+
'''3. Install the shared data library for matchbox-keyboard'''
<pre style="border: 1px dashed black;color:black;width: 50%">
+
{{code|1=
sudo apt-get install libmatchbox1                             </pre>
+
sudo apt-get install libmatchbox1                             }}
 
As following:
 
As following:
 +
 
[[File:Soft_Keyboard-02.png|750px]]
 
[[File:Soft_Keyboard-02.png|750px]]
4. Create a virtual keyboard startup script
+
 
<pre style="border: 1px dashed black;color:black;width: 50%">
+
'''4. Create a virtual keyboard startup script'''
sudo nano /usr/bin/toggle-matchbox-keyboard.sh                </pre>
+
{{code|1=
 +
sudo nano /usr/bin/toggle-matchbox-keyboard.sh                }}
 
Paste the following, press Ctrl + X and Y, to save then exit
 
Paste the following, press Ctrl + X and Y, to save then exit
<pre style="border: 1px dashed black;color:black;width: 50%">
+
{{code|1=
 
#!/bin/bash
 
#!/bin/bash
 
#This script toggle the virtual keyboard
 
#This script toggle the virtual keyboard
Line 51: Line 47:
 
matchbox-keyboard -s 50 extended&
 
matchbox-keyboard -s 50 extended&
 
fi
 
fi
                                                              </pre>
+
                                                            }}
 
Add executable permission for the script above
 
Add executable permission for the script above
<pre style="border: 1px dashed black;color:black;width: 50%">
+
{{code|1=
sudo chmod +x /usr/bin/toggle-matchbox-keyboard.sh              </pre>
+
sudo chmod +x /usr/bin/toggle-matchbox-keyboard.sh              }}
 +
 
 +
'''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
 +
{{code|1=
 +
[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'''
 +
{{code|1=sudo reboot  }}
 +
 
 +
 
 +
 
 +
'''7. Add virtual keyboard to taskbar '''
 +
<br><br>
 +
Right click on the taskbar    <br><br>
 +
[[File:虚拟键盘-1.png|750px]]  <br>  <br>
 +
[[File:虚拟键盘-2.png|750px]]  <br>  <br>
 +
[[File:虚拟键盘-3.png|750px]]  <br>  <br>
 +
[[File:虚拟键盘-4.png|750px]]  <br>  <br>
 +
 
 +
 
 +
P.S. Log into via SSH to see how to change the size of the virtual keyboard
 +
{{code|1=DISPLAY=:0.0 matchbox-keyboard -s 50 extended
 +
DISPLAY=:0.0 matchbox-keyboard -s 100 extended
 +
}}

Latest revision as of 19:17, 8 December 2020


语言选择

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)

Soft Keyboard-01.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

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

虚拟键盘-1.png

虚拟键盘-2.png

虚拟键盘-3.png

虚拟键盘-4.png


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