Down to the pixel

Follow one key press from your fingertip to a single lit pixel.

It starts with a press.

Pressing a key pushes it down. That small movement is the whole input.

Go deeper
All the switch needs
Your finger only moves a small plastic stem down inside the switch. Everything that follows starts from that movement.
Halfway is enough
These figures are for one common switch, the CHERRY MX Red. It travels 4 mm all the way down but registers at 2 mm, so a light press counts.
Ready for the next one
A spring pushes the key back up as soon as you let go, so the next press can start straight away.

The switch closes a circuit.

Under the cap, two metal contacts are held apart by a spring. Press down and they touch, and a signal can flow.

Go deeper
Smooth all the way down
This is a linear switch: it feels the same from top to bottom. Tactile and clicky switches add a bump or a click so you can feel the press register.
Firmer as it goes
The spring pushes back with 30 cN at the start and 100 cN at the bottom. That rising push is what sends the key back up.
The keyboard keeps checking
The keys are wired in a grid of rows and columns. A chip in the keyboard checks the grid many times a second, and a closed circuit tells it which key is down.

Circuit closed

Down the wire as a message.

A chip in the keyboard turns the closed circuit into a short coded message and sends it down the cable, along two thin wires twisted round each other.

Go deeper
A code for the key
The keyboard sends a number for the key's position. The computer decides which letter that key means, which is why one keyboard can type in many languages.
Two wires as opposites
The message travels down the pair as opposite signals: as one wire goes up, the other goes down. The computer reads the difference between them.
Why they are twisted
Twisting keeps both wires equally close to any outside interference. It nudges both the same way, so the difference between them stays clean.

Into the processor.

On the computer's main board, the message runs along thin copper tracks to the processor. Under its metal lid is a sliver of silicon covered in switches far too small to see.

Go deeper
A tap on the shoulder
When the message arrives, the processor pauses what it is doing for a moment to deal with it, then goes back to its other work.
From code to letter
A small program, the keyboard driver, reads the key's code. The system looks it up in your keyboard layout and hands the letter to the program you are typing into.
Switches all the way down
The silicon is covered in transistors: switches like the one under the key, only far smaller and with no moving parts. Reading your key press is these switches turning on and off in patterns.

Drawn in pixels.

The graphics processor, often part of the same chip, takes the letter's shape from the font and lays a grid of pixels over it. Each pixel is filled by how much of the shape covers it.

Go deeper
A shape, not a picture
A font stores each letter as an outline: points joined by straight lines and curves. That is why the same letter stays sharp at any size.
Softer edges
A pixel the edge only half covers gets a shade in between. Your eye reads those in-between shades as a smoother edge than the grid could draw on its own.
Kept in memory
The finished picture is held in memory as a grid of values, one for each pixel, and sent to the screen many times a second.

One lit pixel.

The picture reaches the screen. Every pixel is three tiny lights, red, green and blue, and how brightly each one shines mixes into the colour you see. This one is part of your M.

Go deeper
Three lights in one
Each pixel holds a red, a green and a blue light. From a normal distance they are too small to see apart, so your eye blends them into one colour.
Mixing a colour
Turning each light up or down makes a wide range of colours; all three fully on looks white. This warm cream has red and green bright and blue held lower.
Over and over
The screen redraws the whole picture many times a second, so your letter shows up on the next redraw after the new picture arrives.

From a press to a pixel.

That is the whole path of one key press, from your fingertip to a single lit pixel.

Press it again
The stem

The plastic plunger under the keycap. As it moves down, it lets the two metal contacts spring together.

The spring

The coil that pushes the key back up. It takes about 45 cN, roughly the weight of 45 grams, to press it far enough.

The contacts

Two thin strips of metal. At 2 mm they touch, the circuit closes, and the keyboard registers the key.

The braid

A woven sleeve over the outside of the cable that protects it from wear.

The foil shield

A thin wrap of metal foil round the wires inside. It keeps outside electrical noise away from them.

The data pair

The two wires that carry the message, as opposite signals. Twisting them makes outside noise hit both alike, so it cancels out.

The plug

The connector at the end of the cable. Its contacts meet the socket’s, so power and data can pass through.

The metal lid

A heat spreader. It protects the silicon and spreads its heat over a wider area, so a cooler can carry it away.

The silicon

The die: a thin slice of silicon holding the processor’s circuits, built from transistors far too small to see.

Capacitors

Tiny parts that hold a little electric charge and release it in an instant, smoothing sudden changes in the chip’s power.

The outline

The letter as the font stores it: points joined by lines and curves, which can be drawn at any size.

A grid of pixels

The picture on a screen is a grid of tiny squares, each one colour. The letter has to be fitted onto that grid.

An edge pixel

A pixel only partly inside the letter’s shape. It gets an in-between shade, so the edge looks smooth rather than jagged.

The red light

One of the three tiny lights in every pixel, each turned up or down on its own. Here red runs at full strength.

The green light

One of the three tiny lights in every pixel. Here green runs most of the way up.

The blue light

One of the three tiny lights in every pixel. Here blue runs at about half, which is what turns the mix of all three into the letter’s warm cream.