Skip to Content

On-screen keyboard for Raspberry Pi: Squeekboard, Onboard and Matchbox

Which virtual keyboard to install on a Raspberry PLC or Touchberry Pi Panel PC, with Wayland or X11
November 15, 2021 by
On-screen keyboard for Raspberry Pi: Squeekboard, Onboard and Matchbox
Boot & Work Corp. S.L, Fernandez Queralt Martinez

The on-screen keyboard to install on a Raspberry Pi depends on the desktop. Raspberry Pi OS Bookworm, updated since October 2024, runs Wayland with the labwc compositor and includes Squeekboard, which appears by itself when the system detects a touch display. On an X11 desktop (Bullseye, or Bookworm switched to X11), install Onboard if you need settings and auto-show, or Matchbox if you want a light keyboard. Florence, the third keyboard of the first version of this post, is no longer in Debian and does not install on Bullseye or Bookworm.

This guide applies to the Raspberry PLC and to the Touchberry Pi Panel PC, which run Raspberry Pi OS. The Industrial Shields images are based on Bullseye or Bookworm (see installing an operating system in the Raspberry PLC), so the first step is to know which desktop your device runs.

Close-up of a backlit physical keyboard, the device that an on-screen keyboard replaces on a touch panel

Which on-screen keyboard works on your Raspberry Pi OS?

KeyboardDesktopHow to get itBest for
SqueekboardWayland with labwc (Bookworm since October 2024)Included, or sudo apt install squeekboard wfplug-squeekTouch panels: it shows and hides by itself
OnboardX11sudo apt install onboardMany settings: layouts, themes, auto-show, typing help
MatchboxX11sudo apt install matchbox-keyboardA simple full-width keyboard with few dependencies
FlorenceX11 on Buster and olderNot available on Bullseye or BookwormReplace it with Onboard

A virtual keyboard is a program that draws a keyboard on the screen and sends a key press to the active window when you touch a key. On a Panel PC or on a Raspberry PLC with a touch display, it lets the operator type a value, a password or a setpoint without a physical keyboard in the cabinet.

Check if your desktop runs Wayland or X11

Open a terminal on the desktop of the device and run:

echo $XDG_SESSION_TYPE
grep VERSION_CODENAME /etc/os-release

The first command prints wayland or x11. The second one prints the Debian release: bullseye, bookworm or trixie. To change the desktop, run sudo raspi-config and open Advanced Options > Wayland: there you choose labwc (Wayland) or the X11 Openbox window manager. Reboot after the change.

Squeekboard, the keyboard of Raspberry Pi OS on Wayland

Raspberry Pi added Squeekboard in the October 2024 release of Raspberry Pi OS, the same release that made labwc the default desktop on all models. When the system detects a touch display, the keyboard appears at the bottom of the screen when a text field is active and hides when it is not.

  • If it is not installed, run sudo apt install squeekboard wfplug-squeek and reboot.
  • Show or hide it by hand with the keyboard icon at the right end of the taskbar.
  • To keep it always shown or always hidden, use the Display tab of Raspberry Pi Configuration (Control Centre in newer releases) or the Display section of raspi-config.

Squeekboard only works with labwc. It does not work with the older Wayfire compositor or with X11. Auto-show works with most applications, but not with all of them: if a field does not open it, use the taskbar icon.

Onboard on an X11 desktop

Onboard is the keyboard with the most options for X11. Install it from the terminal:

sudo apt update
sudo apt install onboard
Raspberry Pi terminal running sudo apt update
Raspberry Pi terminal running sudo apt install onboard

Open it from Menu > Universal Access > Onboard, or run onboard in a terminal. In Onboard Preferences you choose the layout, the theme, the key-press behaviour and the typing assistance. To make it open by itself, check Auto-show when editing text.

Onboard keyboard open below a terminal window on the Raspberry Pi desktop
Onboard Preferences window on the Theme tab, with the Nightshade theme selected and the keyboard below

Matchbox keyboard, the light option

Matchbox is a simple full-width keyboard. It is the one that the Raspberry Pi documentation suggests for older releases without Squeekboard. Install it with:

sudo apt install matchbox-keyboard

Start it with matchbox-keyboard or from the menu. Right-click on its top bar for more options.

Raspberry Pi OS desktop with a terminal window and the Matchbox keyboard across the bottom of the screen
Matchbox keyboard at full width below a terminal window on the Raspberry Pi desktop

Florence no longer installs on Bullseye or Bookworm

Florence is a floating keyboard with an icon to open and close it. Debian removed it from testing in April 2020 and from unstable in July 2023, so Bullseye and Bookworm do not have the package and sudo apt install florence ends with an error. The screenshot below is from Raspbian Buster, the last release where it installed. On a current image, use Onboard instead.

Florence keyboard on Raspbian Buster after installing the package from the terminal, with its floating icon on the left

A touch screen as the operator panel. In the water bottling case study, a TouchBerry Pi 7" runs the station as PLC and HMI: conveyor, sensors, cylinder and pump on its own I/O. To protect the settings of a Node-RED dashboard on a touch panel, the PLC solution library has an admin login with an on-screen keyboard and a session timeout.

Read the water bottling case studySee the Node-RED admin login

FAQ about on-screen keyboards on a Raspberry Pi

Does Raspberry Pi OS have a virtual keyboard?

Yes. Raspberry Pi OS Bookworm with the labwc desktop includes Squeekboard since the October 2024 release. Raspberry Pi OS Trixie (Debian 13), the current release, includes it too, with its settings in Control Centre > Display. Older releases and X11 desktops need Onboard or Matchbox.

Why does the keyboard not appear when I touch a text field?

Squeekboard shows itself only when the system detects a touch display and the application supports it. Onboard needs Auto-show when editing text checked in its preferences. Matchbox does not show itself: start it from the menu or from a script.

Can I install Florence on Raspberry Pi OS Bookworm?

Not from the repositories. The package is not in Bullseye or Bookworm. Use Onboard, which has a floating icon too.

Can I use Onboard or Matchbox on the Wayland desktop?

They are X11 programs. On a Raspberry PLC or Panel PC used as a touch panel, either use Squeekboard with labwc or switch the desktop to X11 with raspi-config and use Onboard or Matchbox.

How do I show a keyboard in kiosk mode?

In kiosk mode the operator only sees one application, so the keyboard must open by itself. The guide kiosk mode and virtual keyboard setup shows Onboard with auto-show on a Panel PC.

​Search in our Blog

On-screen keyboard for Raspberry Pi: Squeekboard, Onboard and Matchbox
Boot & Work Corp. S.L, Fernandez Queralt Martinez November 15, 2021
Share this post

Looking for your ideal Programmable Logic Controller?

Take a look at this product comparison with other industrial controllers Arduino-based. 

We are comparing inputs, outputs, communications and other features with the ones of the relevant brands.

PLC Comparison