Transforms a Raspberry Pi Zero (RPi0) into a keyboard operable by a user with motor disabilities.
The RPi0 is connected to a host computer through its USB communication port, as well as to a video/audio device through its mini-HDMI port. A simple push-button (normally open monostable switch) is also connected between the ground and pin 21 of the RPi0 GPIO. The host computer provides the power through the USB connection.

On the one hand, from the host computer point of view, the RPi0 appears as a standard USB keyboard. On the other hand, the RPi0 displays on the device connected to its HDMI output a matrix of symbols that are continuously scanned until one of them is selected, which occurs when the push-button is activated.
Symbols are logically organized as a tree in which the user navigates. When a specific tree node is active, its children are scanned sequentially until the user selects one of them. If the selected child is another tree node, it becomes the active node. If the selected child is a leaf, i.e. a terminal tree node, one or several scan-codes are sent to the host computer, simulating specific keystrokes. The root node of the tree is then reactivated to start a new selection process.
On the attached HDMI device, several rows of symbols are displayed. The first row displays the symbols associated with all the children of the root node. When the root node is scanned, this first displayed row is active and each child symbol is highlighted (displayed in yellow) every two seconds. When a symbol is highlighted, an optional associated sound is also played on the audio output, allowing users with visual impairments to use the system. If the highlighted symbol corresponds to a tree node with children, all the symbols associated with them are displayed on the next row.
When a symbol of the active row is selected, if its tree node has no child, associated keystrokes are sent to the host computer as described before and the process starts over. When the tree node associated with the selection has children, the symbol is now displayed in red and the next row of symbols becomes active. This allows for using several depth levels for each tree branch.
A resting state (pause) stops the scanning process when the user does not select a symbol during two successive scanning cycles of the active node. During the resting state, the display only shows the symbols associated with the root node. To restart the scanning process, the user must activate the push-button once. At boot, the system is in the resting state, therefore a first activation of the push-button is required.
# Installation on a Raspberry Pi Zero
The installation steps described hereafter have been checked on a Raspberry Pi Zero W V1.1, after a fresh install of a 32bit version of Raspbian (bullseye v11, kernel v5.15, release date: April 4th 2022). For Raspbian installation instructions, see [https://www.raspberrypi.com/software/](https://www.raspberrypi.com/software/).