How it works · Tech

Keyboard switch.

Every keystroke is a tiny machine at work: a spring, a plastic stem and two strips of metal that touch halfway down.

Take it apart
3D model of a keyboard switch
Loading 3D…

01 / 05

Overview

9 parts, one idea.

See how a mechanical keyboard switch works in 3D: keycap, stem, spring, metal contacts, housing, plate and PCB. Press the key and watch it actuate.

Drag to orbit, pinch or scroll to zoom, tap any part.

02 / 05

Explode

Pull it apart.

Keep scrolling and every part slides away from the centre, so you can see how they fit together.

03 / 05

Slice

Cut it open.

A section plane sweeps through the model as you scroll. Pick an axis and set the depth yourself.

04 / 05

Parts

Tap to learn.

Pick a part or tap a glowing dot. It lights up and everything else fades back.

05 / 05

Facts

Worth knowing.

2 mm

Many switches actuate about halfway through their 4 mm of travel.

1878

QWERTY dates from Christopher Sholes's typewriter patent.

Matrix

Keys are wired in rows and columns and scanned many times a second.

Explained

How a keyboard switch works.

How a mechanical switch works

A mechanical keyboard has a separate switch under every key. Each one is a small machine with a plastic housing, a sliding stem, a coil spring and a pair of metal contacts. When you press the keycap, the stem slides down against the spring. At the actuation point, the stem's legs move out of the way and one springy metal leaf snaps against the other, closing a circuit. Let go and the spring pushes everything back up.

On many common switches the key actuates at about 2 millimetres, roughly halfway through about 4 millimetres of total travel. Fast typists learn to release the key just after it actuates, without hitting the bottom. The model here is a generic cross-stem switch with no brand markings.

Linear, tactile and clicky

Switches are often sorted into three families. Linear switches feel smooth all the way down; the spring simply gets heavier. Tactile switches have a bump on the stem that you feel just before actuation, which tells your finger the key has registered. Clicky switches add a part that snaps to make an audible click at the same moment. The spring weight, measured in grams of force or centinewtons, changes how heavy each type feels.

The keycap fits onto the stem's cross-shaped mount, so caps can be swapped. The plate holds every switch in a rigid grid, and the material it is made from changes the sound and feel of typing.

From switch to keystroke

A keyboard doesn't wire every key to its own input. The switches sit in a grid of rows and columns on the PCB, and a small controller scans the grid many times a second, powering one row at a time and checking which columns respond. Diodes beside each switch stop phantom keys when several are held at once. The controller also debounces each press, because metal contacts bounce for a few milliseconds before they settle.

The QWERTY layout itself dates from Christopher Latham Sholes's typewriter, patented in 1878. Open Play to press the key yourself and watch the contacts close and the LED light at actuation, then try the 10-second challenge.

Parts glossary

Keycap
The cap you press. A cross-shaped socket underneath grips the stem.
Top housing
The upper shell guides the stem and keeps out dust. Here it is translucent so the LED can shine through.
Stem
The stem slides down when you press. Its legs hold the metal contacts apart until it moves out of the way.
Spring
A steel coil spring pushes the key back up. Its strength sets how heavy the key feels.
Metal contacts
Two springy metal leaves. When the stem moves down, one leaf springs against the other and closes the circuit. Fun fact: On many common linear switches the circuit closes at about 2 mm, roughly halfway through about 4 mm of total travel.
Bottom housing
The base holds the spring, contacts and pins in place.
Pins
Metal pins pass through the PCB and are soldered or pushed into hot-swap sockets.
Plate
A steel or aluminium plate holds every switch in a rigid grid and gives the keyboard its feel.
PCB
The circuit board connects every switch into a grid of rows and columns that the keyboard controller scans.

D3DDD

Need 3D renders or drawings like this?

D3DDD makes them: product cutaways, exploded views, architectural renders and technical drawings.

Made with AI by D3DDD