A mechanical keyboard is a keyboard in which every key has its own discrete switch, a self-contained assembly with a housing, a moving stem, a spring and a sensing mechanism. This distinguishes it from membrane and rubber-dome keyboards, where all keys press onto shared plastic sheets. Among computer peripherals, mechanical keyboards are valued for consistent key feel, precise actuation, long service life and repairability.
The term describes the switch architecture, not a specific sound or appearance. A mechanical keyboard can be silent or loud, light or heavy, wired or wireless, and modern variants even replace metal contacts with optical or magnetic sensing while keeping the individual-switch design.
How a mechanical key switch works
A classic mechanical switch registers a keystroke when the stem pushes two metal contacts together partway through its travel. In the widespread MX-style design, the stem travels 4.0 mm in total and actuates at about 2.0 mm, so the key registers before it bottoms out. The spring returns the stem and sets the force needed to press it, measured in centinewtons (cN) or the roughly equivalent gram-force.
Metal contacts bounce for a few milliseconds when they close, producing several electrical transitions. The keyboard firmware applies a debounce interval, commonly around 5 ms, and reports only one press. Switches that sense position optically or magnetically have no contact bounce and can use shorter or no debounce intervals.
Switches are grouped by how the keystroke feels. The table summarizes the main families.
| Switch family | Feel and sensing | Typical actuation force | Typical use |
|---|---|---|---|
| Linear | Smooth travel, no bump, metal contacts | 35-60 cN | Gaming, fast repeated presses |
| Tactile | Noticeable bump at actuation | 45-67 cN | Typing and general office work |
| Clicky | Bump plus an audible click | 50-60 cN | Typing where noise is acceptable |
| Optical | Stem interrupts a light beam | 40-60 cN | Gaming with no contact bounce |
| Hall effect (magnetic) | Sensor measures magnet position | 30-60 cN | Adjustable actuation and rapid trigger |
| Electrocapacitive (Topre-style) | Rubber dome with capacitive sensing | 30-55 cN | Quiet, cushioned typing |
Whether electrocapacitive switches count as mechanical is debated, because they use a rubber dome. They are usually grouped with mechanical keyboards because each key still has an individual spring and sensing element.
Mechanical, membrane and scissor keyboards compared
The practical difference between keyboard types lies in how consistently each key behaves and how long it lasts. Membrane keyboards are cheaper and quieter by default; scissor switches dominate laptops because of their low height.
| Property | Mechanical | Membrane (rubber dome) | Scissor switch |
|---|---|---|---|
| Key travel | 3.0-4.0 mm | 3.5-4.0 mm | 1.0-1.5 mm |
| Actuation | Defined point before bottom-out | Usually at bottom-out | Near bottom-out |
| Rated lifespan per key | Typically 50-100 million presses | Often 5-10 million presses | Often around 10 million presses |
| Repairability | Single switches replaceable | Whole sheet replaced | Difficult without spares |
| Cost | Moderate to high | Low | Low to moderate |
Lifespan figures are manufacturer ratings under laboratory conditions, not guarantees. In practice, mechanical keyboards most often fail through dirt, liquid spills or a single chattering switch, which is easy to replace on a hot-swappable board.
Scanning, rollover and polling
A keyboard controller detects keys through a matrix scan: switches are wired in rows and columns, and the controller energizes one row at a time to read which columns respond. When three pressed keys form three corners of a rectangle, an unintended fourth key can appear, an effect called ghosting.
Mechanical keyboards usually place a diode in series with every switch, which blocks the false current path and enables N-key rollover (NKRO), meaning every key can be registered simultaneously. The USB boot protocol is limited to six keys plus modifiers, so NKRO keyboards use a custom HID report once the operating system has loaded.
The polling rate sets how often the host asks the keyboard for new data. A 1,000 Hz rate corresponds to 1 ms intervals, while some gaming models offer 8,000 Hz, or 0.125 ms. The gain above 1,000 Hz is measurable but small compared with debounce time and display latency.
Layouts, keycaps and build options
Mechanical keyboards come in standardized layout sizes that remove key clusters to save desk space. The ANSI layout used in the United States differs from the ISO layout mainly in the shape of the Enter key and one extra key next to the left Shift.
| Layout | Keys (ANSI) | What is removed | Suitable for |
|---|---|---|---|
| Full size (100%) | 104 | Nothing | Data entry with heavy numpad use |
| Tenkeyless (TKL) | 87 | Numeric keypad | General use with more mouse space |
| 75% | About 84 | Numpad; navigation keys compressed | Compact setups that keep function keys |
| 65% | About 68 | Numpad and function row | Portable and minimalist setups |
| 60% | 61 | Numpad, function row, arrows | Users comfortable with layer shortcuts |
Keycap material affects durability and feel. ABS plastic is common and allows sharp double-shot legends but develops a shine within months of heavy use; PBT plastic resists shine and feels slightly textured. Hot-swap sockets let users replace switches without soldering, and open-source firmware such as QMK allows remapping keys and creating layers.
Common problems and misconceptions
A frequent misconception is that a mechanical keyboard prevents repetitive strain injury by itself. Switch type has a small effect at most; posture, keyboard height, wrist angle and split or tented designs matter far more for ergonomics.
| Problem | Likely cause | Remedy |
|---|---|---|
| Double letters from one press (chatter) | Worn or dirty contacts | Clean or replace the switch; raise the debounce time |
| Keys missed during fast combinations | No diodes, so rollover is limited | Use an NKRO keyboard |
| Excessive noise in a shared office | Clicky switches or hard bottom-out | Use silent linear switches or dampeners |
| Shiny, slippery keycaps | ABS wear from skin oils | Replace with PBT keycaps |
| Hand fatigue during long typing | Heavy springs or poor posture | Choose lighter switches; adjust desk height |
Put simply
In a mechanical keyboard, every key has its own small spring-loaded switch, like a row of individual doorbells. In a cheaper membrane keyboard, all keys press onto one shared rubber sheet, more like pushing on a single mattress at different spots.
Because each switch is separate, every key feels the same, lasts longer and can be replaced if it fails. People choose the switch type the way they choose shoes: some prefer a light, smooth press, others a noticeable bump or a click. The keyboard type changes the feel, not how fast someone types.
In practice
A software developer in an open-plan office uses a tenkeyless mechanical keyboard with 87 hot-swappable keys. The original clicky switches draw complaints from colleagues, so the developer replaces all of them with silent linear switches rated at 45 cN, a 20-minute job with a switch puller and no soldering. The lighter springs also reduce finger fatigue during long coding sessions.
After two years, the E key begins to type double letters. Instead of replacing the whole keyboard, the developer swaps that single switch from a small stock of spares in under a minute. The keyboard, now rebuilt to the developer’s preferences, stays in daily service with one inexpensive part replaced rather than a new device purchased.