September 11, 2023

Pavle Ignjatović

How keyboards work?

It is very likely that you have used the computer at some time in your life, and probably work on it every day. Then, you certainly know what the keyboard is, but have you ever wondered how it works? Well, turns out that the principles behind its work are quite simple, so we will explain them in this new Onlinity Learning article.

If we were to take the keyboard apart, we would see the following things: key buttons, a small processor, and a printed circuit board (PCB) with connectors for each button on it.

The printed circuit board (PCB) is a board made from insulating materials (most usually fibre-reinforced plastic) with copper wires precisely imprinted onto it. They also have a layer of coating to prevent corrosion and short circuits. Connectors for all the keys are put on board and wires in these places are interrupted.

Printed circuit board. Credits: https://www.rawpixel.com/search/printed%20circuit

The keyboard processor is the part responsible for data delivery to the computer. Depending on the keyboard type, it can be connected to different types of ports, Bluetooth or WiFi adapters.

Button connectors (switches) are parts that hold the keys in place. They consist of several parts: a keycap, stem, slider, switch housings, spring and two metal contact leaves.
The keycap is the button, the part pressed to type a letter. It lays on a stem, fitted through the slider. Metal contacts are put in a way that enables them to be separated, but connected on click. Switch housings hold everything straight and stable.

Parts of the keyboard switch. Credits: https://www.rawpixel.com/search/printed%20circuit

Typing

When a keycap is pressed, the slider moves down, together with one of the metal leaves. It touches another one, completing the electrical circuit and making the recognisable "click" sound. This allows the current to flow in the PCB, the processor to register it and determine the position of the pressed key. When released, the key is returned to its regular position by the spring situated under the slider.