2024年6月11日发(作者:)

一 . 使用我们提供的系统镜像已经安装好了软键盘

二. 在自己的镜像安装软键盘

sudo apt-get update

sudo apt-get install libfakekey-dev libpng-dev libxft-dev autoconf libtool –y

复制Software/ matchbox-keyboard 文件夹到树莓派系统内

进入文件夹执行

cd matchbox-keyboard

./

make

sudo make install

sudo apt-get install libmatchbox1 –y

sudo nano /usr/bin/

复制以下到文件夹内

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

保存退出

sudo chmod +x /usr/bin/

sudo nano

/usr/local/share/applications/

op

复制以下进入文件内

[Desktop Entry]

Name=Toggle Matchbox Keyboard

Comment=Toggle Matchbox Keyboard

Exec=

Type=Application

Icon=

Categories=Panel;Utility;MB

X-MB-INPUT-MECHANSIM=True

进入pi用户后执行

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

找到以下

Plugin {

type = launchbar

Config {

Button {

id=p

}

Button {

id=p

}

}

添加

Plugin {

type = launchbar

Config {

Button {

id=p

}

Button {

id=p

}

Button {

id=p

}

}

保存退出后重启既可以出现软键盘