Raspberry Pi Raspbian Install matchbox-keyboard virtual keyboard

Source: Internet
Author: User
Tags git clone raspbian jessie

Environment: Raspbian-stretch (2018-06-27)

Raspberry Pi: 3 generation B Type

Official website Installation Address: http://ozzmaker.com/virtual-keyboard-for-the-raspberry-pi/

Home found the keyboard some keys have failed, no way, and windows, directly install a virtual key, is also flattered!

Matchbox-keyboard is a "virtual" or "software" keyboard on the screen for small touchscreen TFT connected to the Raspberry Pi.

The Matchbox-keyboard keyboard also uses an XML file to specify the layout of the key, which makes it highly customizable.

1. Install the prerequisite development package

[Email protected] ~ $ sudo apt-get install Libfakekey-dev libpng-dev libxft-dev autoconf libtool-y

2. Install and compile Matchbox-keyboard

[Email protected] ~ $ git clone https://github.com/mwilliams03/matchbox-keyboard.git[email Protected] ~ $ cd matchbox-~/matchbox-keyboard $./~/matchbox-keyboard  ~/ Matchbox-keyboard  $ sudo make install

After installing Matchbox-keyboard, you need to install the shared Matchbox Library.

[Email protected] ~ $ sudo apt-get Install Libmatchbox1-y

3. Create a toggle script to start or stop Matchbox-keyboard
We will now create a script to turn the keyboard on and off. Then add a menu item to access the script and add an icon to the taskbar for easy access.

Create a new file;

[Email protected] ~ $ sudo nano/usr/bin/toggle-matchbox-keyboard.sh

and copy the following text in;

#!/bin/virtual  keyboardpid= ' pidof matchbox-keyboard 'if [!-e $PID] ; Then  killall Matchbox-keyboardelse  matchbox-keyboard&fi

Now let it be executable;

[Email protected] ~ $ sudo chmod +x/usr/bin/toggle-matchbox-keyboard.sh

We will now add an item to the Start menu;

for older mirrors;

[Email protected] ~ $ sudo nano/usr/local/share/applications/toggle-matchbox-keyboard.desktop

For newer mirrors, including Jessie; (I'm a new image here, so use this command)

[Email protected] ~ $ sudo nano/usr/share/applications/toggle-matchbox-keyboard.desktop

Copy the following contents;

[Desktop entry]name=Toggle matchbox keyboardcomment=Toggle matchbox keyboardexec= toggle-matchbox-Keyboard.shtype=applicationicon=matchbox-keyboard.pngcategories= Panel; Utility; MBX-mb-input-mechansim=true

To create an icon on the taskbar, open the LXDE panel configuration;

[Email protected] ~ $ nano ~/.config/lxpanel/lxde/panels/panel

If the file above is empty, then it is likely that you are using a newer version of Raspbian, especially if you are using Pi 2.

You need to edit the panel configuration in this position;

If using Raspbian WHEEZY;

[Email protected] ~ $ nano ~/.config/lxpanel-pi/lxde/panels/panel

If you use Raspbian JESSIE; (I use this command here)

[Email protected] ~ $ nano ~/.config/lxpanel/lxde-pi/panels/panel

Find this part of the configuration;

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

Add id=toggle-matchbox-keyboard.desktop code to go in;

Plugin {    = Launchbar    Config {        Button {            id=toggle-matchbox-keyboard.desktop        }        button {            id=lxde-screenlock.desktop        }        button {            id=lxde-logout.desktop        }    }

4. More information

You can use the following statement to start Matchbox-keyboard from the command linekeyboard.
[Email protected] ~ $ matchbox-keyboard

This will load the default keyboard layout;

Matchbox-keyboard can also resize the window using the-s integer parameter. An integer is a value between 30%-100% of the screen width.
This is the Defualt keyboard layout loaded at 50% of the screen width;

50

Matchbox-keyboard also supports custom keyboards, and some have been loaded into/usr/local/share/matchbox-keyboard/in. It's easy to use your own.

 Extended

Raspberry Pi Raspbian Install matchbox-keyboard virtual keyboard

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.