Raspberry Pi Onscreen Keyboard Without Keyboard
This guide will show y'all how to set upwards an on-screen keyboard for your Raspberry Pi.
An on-screen keyboard can be incredibly useful for your Raspberry Pi in a variety of different cases.
For instance, if you are using your Raspberry Pi with a touchscreen display, using an on-screen keyboard is one of the best ways of adding keyboard input.
Additionally, if you are running a Pi that does not have a keyboard continued and just a mouse, then using an on-screen keyboard will allow you to type still.
Installing an on-screen keyboard to your Raspberry Pi is a straightforward and quick task.
We will also be showing yous how to add an icon to the taskbar to quickly toggle the virtual keyboard on and off.
Equipment Listing
Here is a list of the equipment we recommend for this guide on setting up an on-screen keyboard on your Raspberry Pi.
Recommended
- Raspberry Pi
- Micro SD Menu
- Power Supply
- Ethernet Cable or Wi-Fi
- HDMI Cable
- Monitor
- USB Mouse or Touchscreen
Optional
- Raspberry Pi Case
- USB Keyboard
This guide was tested on a Raspberry Pi 4 running Raspbian Buster. This guide should work successfully on older versions of Raspbian likewise.
Installing the On-Screen Keyboard Software to your Raspberry Pi
1. Before nosotros tin install the on-screen keyboard, nosotros must get-go update our Raspberry Pi.
To upgrade the packages, we need to run the following two commands.
Depending on how long it has been since you last updated, this procedure tin accept some fourth dimension, so be patient.
ii. Now that we have updated our Raspberry Pi, nosotros tin go ahead and install the software we want.
To install the virtual keyboard software, all we need to do is run the post-obit command.
We chose to use the matchbox-keyboard
package as its the about stable for the Raspberry Pi while as well not chewing up to much of the Pi'due south limited resources.
Opening the Virtual Keyboard on the Raspberry Pi
In this section, we will exist showing yous how to open the on-screen keyboard using both the terminal and the desktop card.
Using the Desktop to Open the On-Screen Keyboard
one. Once you lot are on the desktop of your Raspberry Pi, click the icon in the tiptop-left hand corner of the screen.
This icon will bring up the start menu for the operating system.
2. Next, hover over "Accessories" (ane.), this will bring upwards an boosted menu
Within this new menu, click "Keyboard" (2.) to launch the software.
3. The virtual keyboard should now be displayed on your Raspberry Pi's desktop.
You tin can click/tap the letters to type into whatsoever textbox.
Using the Terminal to Launch the Virtual Keyboard
If yous can't find the keyboard pick inside the start card, you lot can also use the terminal to launch the software.
It is too possible to complete this section using SSH if you have no keyboard to connect to the Pi itself.
1. Start by opening up a terminal session on your Raspberry Pi whether that be over SSH or on the Pi itself.
ii. Now within this terminal session, run one of the following commands.
The control you demand to employ differs if you are using SSH or running it straight on your Pi.
The reason for this is that we need to specify the display nosotros want the virtual keyboard to brandish on when using SSH.
On the Raspberry Pi
Over SSH
This control will load upwards the on-screen keyboard software on your Raspberry Pi.
Calculation a Virtual Keyboard Toggle to the Taskbar
This department of the guide volition evidence yous how you can alter Raspbian and so that yous can add a keyboard toggle to your taskbar.
We will be making it and so that when y'all click this button, it volition automatically open up and close the on-screen keyboard software.
i. We volition starting time by creating the bash script that will toggle the matchbox software.
Begin writing this script in the "/usr/bin/
" folder by running the following command.
2. Within this file, enter the following lines of code.
This script is relatively straightforward. It offset tries to grab the id of the virtual keyboard software and stores it in a bash variable called PID.
If it gets a procedure id, then the script will kill the currently running on-screen keyboard.
Otherwise, if there was no process id for the software, it will first information technology up by running the matchbox-keyboard
command.
3. Once done, please relieve the file by pressing CTRL + X, then Y, followed past ENTER.
iv. With our script created, we need to requite everyone the execute privileges so that they can run it.
Y'all can read more than about permissions in linux with our file permissions in Linux guide.
To add together the execute permission, run the post-obit command.
If you would like to learn more than about this control, check out our nuts of chmod guide.
5. Next, we demand to create the file which the taskbar will read to load our toggle push button.
Begin creating this file by using the command below.
six. Inside this file, enter the following lines.
This text tells the operating system how information technology should brandish the entry, as well as telling it should execute the script we wrote when clicked.
7. Now, delight salve the file by pressing CTRL + Ten, then Y, followed by ENTER.
viii. Next, nosotros demand to copy over the default configuration file over to our pi
users config folder.
We will be modifying this file to add our on-screen keyboard button.
ix. Finally, we need to modify the configuration for the pi
user so that the icon is added to the taskbar.
Run the control below to begin modifying the console configuration.
ten. To the lesser of this file, add the following text.
This fleck of text creates an entry in the taskbar. It tells the taskbar to utilize the toggle-keyboard.desktop
file we created earlier on in this department to display our toggle button.
eleven. Once added, please save the file by pressing CTRL + 10, and then Y, followed by ENTER.
12. To show our new button in the taskbar, we need to restart our Raspberry Pi by running the following command.
13. When your Raspberry Pi finishes rebooting, you lot should at present encounter the keyboard icon in the superlative right-hand corner of the screen.
By clicking this icon, you tin toggle the on-screen keyboard on your Raspberry Pi on and off.
Hopefully, at this stage, you accept now successfully prepare an on-screen keyboard on your Raspberry Pi.
If you lot have had any trouble with the virtual keyboard software, feel free to drib a comment beneath.
Source: https://pimylifeup.com/raspberry-pi-on-screen-keyboard/
0 Response to "Raspberry Pi Onscreen Keyboard Without Keyboard"
Post a Comment