One key stops working, or starts working only sometimes, and the natural conclusion is that the keyboard is dying. Often it is not. A speck of debris sitting in exactly the wrong spot can produce symptoms that look identical to a genuinely failed switch, and the two have completely different fixes: one is solved with compressed air and thirty seconds of patience, the other needs a replacement part or a new keyboard.
Guessing wastes time in both directions. People clean a switch that was never dirty and conclude cleaning does not work, or they buy a replacement keyboard for a fault that ninety seconds of proper cleaning would have fixed. Here is how to actually tell the difference.
What is physically happening under the key
Two designs cover almost every keyboard you will encounter, and knowing which one you have changes both the diagnosis and the fix.
Mechanical switches use a physical spring-loaded stem that, when pressed, brings two metal contact leaves together to complete a circuit. Wear here is mechanical: the metal leaves can fatigue over tens of millions of actuations, a stem can crack, or a switch can develop a manufacturing defect from day one that shows up as an intermittent connection.
Membrane and scissor-switch keyboards, which cover most laptop keyboards and most budget desktop boards, work differently. A rubber dome sits over a conductive layer, and pressing the key pushes a conductive pad on the underside of the dome down onto matching traces printed on a membrane sheet beneath it. There is no metal-on-metal contact here. Wear takes the form of the conductive pad or the printed traces degrading, which produces a mushy, often intermittent response rather than a clean binary fault.
Debris causes trouble in both designs, but by a different mechanism. On a mechanical switch, dust or a hair can physically obstruct the stem's travel or sit between the contact leaves. On a membrane keyboard, contamination under the key more often interferes with the dome seating properly against the membrane, or with the membrane layers themselves if anything has worked its way between the sheets.
The signature that tells dirt and failure apart
This is the single most useful diagnostic fact here: dirt tends to produce inconsistent results, while genuine failure tends to produce consistent ones.
A speck of debris does not perfectly and permanently block a switch every single time. It shifts slightly with each press, sometimes allowing full contact and sometimes not, which is why a dirty key often works on the third try after failing on the first two, or works fine when pressed hard and fails when pressed lightly. That variability is the tell.
A genuinely failed switch tends to behave the same way every time. A cracked contact leaf that has separated will not register no matter how you press it. A completely worn-through membrane trace stays worn through. Consistency, in either direction, points toward a real fault rather than contamination.
This is not absolute; some failures are themselves intermittent, particularly a hairline crack that only opens under certain pressure. But as a starting signal, it is the fastest way to form an initial hypothesis before you test further.
Step 1: Look before you test
Remove the keycap if the keyboard allows it. Mechanical keyboards almost always do, using a keycap puller or two spoons if you do not have one. Many membrane and laptop keyboards use keycaps that clip onto a fragile scissor mechanism underneath and are more easily damaged when removed, so be more cautious there, or skip straight to compressed air if you are not confident.
With the cap off, look for the obvious culprits: dust built up around the stem, a hair caught in the mechanism, and crumbs, which are extremely common under keys people eat near. Also look for sticky residue with a slightly discoloured or crystallised texture, which is the signature of a spilled drink rather than ordinary dust, and behaves differently when you try to clean it, since sugar residue in particular does not respond well to compressed air alone and needs a wipe with isopropyl alcohol.
Step 2: compare the feel against a working key
Press the suspect key and an identical, working key elsewhere on the board side by side, paying attention to the actuation force and the way each bottoms out.
A key that requires noticeably more pressure, grinds or scratches as it travels, or bottoms out with a different feel than its neighbour usually has something physically obstructing its travel, which points at contamination rather than an electrical fault. A key that feels completely normal mechanically, with smooth, even travel indistinguishable from a working key, but simply fails to register, points more toward the contact or trace itself rather than anything physically in the way.
Step 3: test the actual response pattern
Open a keyboard test and press the key roughly twenty times at a controlled, even pace, not rapid-fire, and watch what happens each time.
Registers most of the time, fails occasionally. The classic contamination pattern. Clean it.
Fails most of the time, registers occasionally. Could go either way, but leans toward a marginal electrical fault, a switch or trace that is right on the edge of making contact. Worth cleaning first since it costs nothing, but do not be surprised if cleaning does not resolve it.
Never registers, regardless of pressure or angle. Points toward a genuine failure: a broken contact, a fully worn-through membrane trace, or in rarer cases a cracked solder joint on the circuit board beneath the switch.
Registers every time but occasionally fires twice from one press. This is a different fault entirely, switch bounce, where a worn or contaminated switch produces two electrical signals from a single physical press. It has its own diagnosis and is covered in our guide on keyboard ghosting and rollover, which also covers why testing a single suspect key in isolation, the way you are doing here, is different from testing whether multiple keys interfere with each other.
Step 4: the swap test, if your keyboard allows it
This is the most conclusive test available, and it borrows a principle used across all kinds of hardware diagnosis: if a fault follows a part when you move it, the part is broken. If the fault stays behind, the part was fine and something else is wrong.
On a hot-swappable mechanical keyboard, where switches sit in sockets rather than being soldered down, this takes thirty seconds. Pull the suspect switch and a known-good switch from a rarely used key, something like Scroll Lock, Pause, or an unused Numpad key on a board that has one, and swap their positions.
If the fault now shows up wherever the suspect switch physically sits, the switch itself is bad, and replacing it will fix the keyboard.
If the original position still misbehaves even with a known-good switch installed there, the problem is not the switch at all. It is the socket, the circuit board trace beneath it, or a solder joint, and replacing switches will not help.
On a soldered mechanical board or a membrane keyboard, this test is not practical without desoldering equipment, so treat the results from steps 1 through 3 as your best available evidence instead.
Cleaning, done properly
If your evidence points at contamination, here is how to clear it without causing new damage.
Compressed air first. Hold the can upright, never tilted, and use short bursts rather than one long spray, since tilting the can can expel liquid propellant rather than air. This clears loose dust and light debris without introducing any moisture.
Isopropyl alcohol for anything sticky. Use 90 percent concentration or higher on a cotton swab, damp rather than wet, and apply it directly to the exposed switch or contact area with the keycap removed and the keyboard fully powered off and disconnected. High concentration alcohol evaporates quickly and leaves no residue behind, which is why concentration matters here.
Never use water, and never use general purpose lubricants. Water risks corrosion on exposed contacts and can wick into places you cannot see or dry properly. WD-40 and similar lubricants are not designed for electrical contacts, leave a residue that attracts more dust over time, and can degrade some plastics.
Membrane keyboards need extra caution. The membrane sheet is typically several thin layers sandwiched together, and liquid that gets between those layers rather than staying on the surface can spread contamination or cause corrosion across a much wider area than the single key you were trying to fix. If you are not confident the keyboard is fully sealed around the key you are working on, compressed air alone is the safer first attempt, and consider the keyboard more disposable than a mechanical board if that does not resolve it.
Let everything dry completely, at least thirty minutes, before reconnecting and testing again.
When it is a genuine failure
If cleaning made no measurable difference and the swap test, where available, pointed at the switch itself rather than the board, you are looking at real hardware failure rather than contamination.
Mechanical switches are cheap and, on a hot-swappable board, take seconds to replace with no tools beyond a switch puller. On a soldered board, replacement requires a soldering iron and some comfort with desoldering the old switch's pins, which is a reasonable weekend project rather than a quick fix.
Membrane keyboards are generally not economically repairable at the single-key level for a typical consumer, since the conductive layer is one continuous sheet rather than individual replaceable parts. At that point, replacing the keyboard is usually the more sensible outcome than attempting a repair.
Before replacing anything, check whether the keyboard is still within warranty, since a single dead key with no physical damage is a straightforward and normally uncontested warranty claim regardless of manufacturer.
Building the habit
Keyboards accumulate debris continuously and invisibly, and the keys used most, WASD, space, and whatever your most-used shortcuts are, collect the most wear and the most contamination at the same time, which is exactly why they are usually the first to show symptoms.
An occasional careful clean, and testing any key that starts feeling slightly off before it becomes a real problem, catches most of this early. If you want to track a suspect key's consistency over time rather than just once, a click speed test gives you a repeatable way to compare its response rate against a known-good key today versus in a few months. The same swap-test principle used here is the same one worth reaching for whenever you are troubleshooting any input device, our guide on cleaning a controller covers the equivalent process for gamepads, and once you are confident your keyboard itself is clean and responsive, a reaction time test tells you about the part of the equation your keyboard was never responsible for in the first place.
Frequently Asked Questions
Q: How can I tell if my keyboard key is dirty or actually broken?
Q: What is the swap test for a keyboard key?
Q: Is it safe to use isopropyl alcohol on a keyboard switch?
Q: Can a membrane keyboard key be repaired if it is broken?
Q: Why does my most-used key fail before any of the others?
Free Online Gamepad Tester
Test your controller for drift, deadzones, and input lag â no download required.
Launch Tester â