Raspbian does not have a virtual keyboard, at least not reachable by the start menu. I only have a mouse and I want to control my raspberry pi zero, type some commands. What is the easiest way to get virtual keyboard working on it?

Remember: rpi zero does not have wifi so I cannot install things

4 Answers 4


Download matchbox-keyboard and matchbox-keyboard-im packages (link for Raspbian, if you have Buster, you need .deb files version 0.2 dated 28-Jun-2020). Write installation commands in a text file, e.g.:

cd /boot
sudo dpkg -i matchbox*
<- don't forget the newline after the last command

Put the packages and the text file on the FAT partition of the SD card (on the Pi, this will become the /boot folder), plug the card your Pi zero, open the text file with a text editor, and then copy the commands in a terminal window. If you copy a command with the newline character, it gets executed automatically when you paste it.

I don't recommend florence, in my experience this keyboard performs poorly in many scenarios.

  • I finally tried this, and this is what I got: imgur.com/a/CwbzPJS. Do you know what's happening? May 23, 2021 at 2:21
  • @GuerlandoOCs Looks like you're installing a package which is already installed. If you don't have a working keyboard by now, I recommend you remove both matchbox related packages and install them again from scratch. May 25, 2021 at 8:18
  • How should I start this keyboard then? It's not on accessories and I cannot type commands on terminal to see May 25, 2021 at 23:11

I tried two different ones: matchbox-keyboard and florence.

You will need a connected USB keyboard to be able to try them. Otherwise, use an SSH connection.

Open a "Terminal" and type sudo apt install matchbox-keyboard. You will find it installed under "Accessories" with the name "Keyboard".

In my opinion, florence is better and more intuitive, but it depends on the at-spi2-core package to work properly, or it will hang on first "keystroke".

Try it with sudo apt install florence at-spi2-core. You will find it installed under "Universal Access" with the name "Florence Virtual Keyboard".

  • But I can't install things on it because it has no wifi Feb 23, 2021 at 20:52
  • cheap wifi dongle will fix that - because to add something you need to install it Feb 24, 2021 at 1:35
  • Nice hint about at-spi2-core, small correction though: florence doesn't depend on it (check out the package dependencies), and that's probably the root cause of the problem. Not having the necessary package listed as a dependency is essentially a bug, and I'm convinced it's not the only one, that's why I don't recommend Florence. Sep 23, 2021 at 8:03

Couldn't make it work with the answer here, but I did:

sleep 30; sudo apt-get install -y matchbox 

as you see, I had 30 seconds to take off the usb keyboard to put the usb ethernet adapter so it could install matchbox

then run


for some reason all the usb hubs I tried wouldn't work so I could not use keyboard + ethernet adaptar at the same time


Same method as Dmitry's answer, but I recommend trying out Onboard which is more useable than matchbox and florence IMO.

Not associated with Onboard, just want more visiblity for other options

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.