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: Difference between revisions

From LCD wiki
Liang (talk | contribs)
No edit summary
Liang (talk | contribs)
No edit summary
 
(35 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== <big>How to install Soft Keyboard</big> ==
{{lan
<big>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.
    |cn=https://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)
Official reference address (English)
    |en=https://www.lcdwiki.com/How_to_install_Soft_Keyboard                                                    }}
http://ozzmaker.com/virtual-keyboard-for-the-raspberry-pi/</big>
<br/>
== <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.


<big>1. Install the necessary files
Official reference address  http://ozzmaker.com/virtual-keyboard-for-the-raspberry-pi/
 
'''1. Install the necessary files'''
{{code|1=
sudo apt-get update
sudo apt-get update
sudo apt-get install libfakekey-dev libpng-dev libxft-dev autoconf libtool <br>2. Install the matchbox-keyboard
sudo apt-get install libfakekey-dev libpng-dev libxft-dev autoconf libtool
git clone https://github.com/mwilliams03/matchbox-keyboard.git</big>
}}
'''2.Install the matchbox-keyboard'''
{{code|1=
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)


<big>cd matchbox-keyboard</big>
[[File:Soft_Keyboard-01.png]]


<big>./autogen.sh</big>
Continue:
<big>(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)
{{code|1=
[[File:Soft_Keyboard-01.png|750px]]</big>
<big>Continue:
sudo make
sudo make
sudo make install</big>
sudo make install
 
}}
<big><br />3. Install the shared data library for matchbox-keyboard
'''3. Install the shared data library for matchbox-keyboard'''
sudo apt-get install libmatchbox1
{{code|1=
As following:</big>
sudo apt-get install libmatchbox1                             }}
As following:
<big>[[File:Soft_Keyboard-02.png|750px]]</big>
 
<big>4. Create a virtual keyboard startup script
sudo nano /usr/bin/toggle-matchbox-keyboard.sh</big>
 
<big>Paste the following, press Ctrl + X and Y, to save then exit</big>


<big>!/bin/bash</big><big>This script toggle the virtual keyboard</big>
[[File:Soft_Keyboard-02.png|750px]]


<big>PID=`pidof matchbox-keyboard`
'''4. Create a virtual keyboard startup script'''
{{code|1=
sudo nano /usr/bin/toggle-matchbox-keyboard.sh                }}
Paste the following, press Ctrl + X and Y, to save then exit
{{code|1=
#!/bin/bash
#This script toggle the virtual keyboard
PID=`pidof matchbox-keyboard`
if [ ! -e $PID ]; then
if [ ! -e $PID ]; then
killall matchbox-keyboard
killall matchbox-keyboard
else
else
matchbox-keyboard -s 50 extended&
matchbox-keyboard -s 50 extended&
fi</big>
fi
                                                            }}
Add executable permission for the script above
{{code|1=
sudo chmod +x /usr/bin/toggle-matchbox-keyboard.sh              }}


<big>Add executable permission for the script above
'''5. Add script above to Start menu'''
sudo chmod +x /usr/bin/toggle-matchbox-keyboard.sh</big>
{{code|1=
sudo nano /usr/share/applications/toggle-matchbox-keyboard.desktop
}}


<big><br />5. Add script above to Start menu
Paste the following content, press Ctrl + X and Y, to save then exit
sudo nano /usr/share/applications/toggle-matchbox-keyboard.desktop</big>
{{code|1=
 
<big>Paste the following content, press Ctrl + X and Y, to save then exit
[Desktop Entry]
[Desktop Entry]
Name=Toggle Matchbox Keyboard
Name=Toggle Matchbox Keyboard
Line 52: Line 66:
Icon=matchbox-keyboard.png
Icon=matchbox-keyboard.png
Categories=Panel;Utility;MB
Categories=Panel;Utility;MB
X-MB-INPUT-MECHANSIM=True</big>
X-MB-INPUT-MECHANSIM=True                                         }}
 


<big>6. Create an icon on the taskbar (Note that in this step, must be "pi" user privileges, if you use administrator privileges, will not find the file)
nano ~/.config/lxpanel/LXDE-pi/panels/panel</big>


<big>7. Find the resembles similar to the following command (default content may be different in different Raspberry Pi versions)
'''6. Restart the system'''
Plugin {
{{code|1=sudo reboot   }}
type=launchbar
Config {</big>
    <big>Button {
      id=/usr/share/applications/lxde-x-www-browser.desktop
    }
    Button {
      id=/usr/share/raspi-ui-overrides/applications/pcmanfm.desktop
    }
    Button {
      id=/usr/share/raspi-ui-overrides/applications/lxterminal.desktop
    }
    Button {
      id=/usr/share/applications/wolfram-mathematica.desktop
    }
    Button {
      id=/usr/share/applications/wolfram-language.desktop
    }
   }</big>
<big>}</big>


<big>Add the following code to add an icon item</big>
  <big>Button {</big>
<big>id=toggle-matchbox-keyboard.desktop</big>
        <big>}</big>
<big>After modifying, would show as below:</big>


<big>[[File:Soft_Keyboard-03.png|750px]]</big>


<big>8. After modifying, run the following command and re-start the system; you will see a virtual keyboard icon in taskbar on the screen normally.
'''7. Add virtual keyboard to taskbar '''
sudo reboot</big>
<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>


<big>P.S. Log into via SSH to see how to change the size of the virtual keyboard</big>


<big>DISPLAY=:0.0 matchbox-keyboard -s 50 extended
P.S. Log into via SSH to see how to change the size of the virtual keyboard
DISPLAY=:0.0 matchbox-keyboard -s 100 extended</big>
{{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)

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