Skip to content

How to Clean a Keyboard Without Damaging It

Published: · 5 min reading time · Updated:

A keyboard collects dust, crumbs, skin and hair in the gaps around every switch, and the first symptom is rarely dirt you can see. It is a key that needs a harder press than its neighbours, or one that fires twice from a single tap, the kind of fault someone who types without looking at the keyboard notices before anyone glancing at the screen does. Cleaning fixes most of that with compressed air and isopropyl alcohol at 70 to 99 percent, provided you disconnect the board first and keep liquid away from the electronics.

Disconnect before you touch anything

Unplug a wired keyboard. Switch off a wireless one and take the batteries out if it has them. For a laptop, shut the machine down completely rather than closing the lid, because a sleeping laptop still has power on the keyboard matrix and a wet cloth across live contacts can short traces or register hundreds of keystrokes.

Get the loose debris out first

Tilt the keyboard upside down over a bin and tap the back firmly. A surprising amount falls straight out, and removing it before you introduce any moisture stops crumbs turning into paste.

Then use compressed air. Two details decide whether it helps.

Removing keycaps, and when not to

On a mechanical keyboard the keycaps are meant to come off. Photograph the board first so you can put every legend back where it belongs, then pull each cap straight up with a wire or plastic puller. Pull vertically, never at an angle, and take extra care with the long stabilised keys, spacebar, Enter, Shift and Backspace, because they sit on separate stabiliser mechanisms that have to be re-seated correctly.

Removed keycaps can be washed in warm water with a little dish soap, rinsed and left to dry completely, which takes several hours. Do not put them back damp, and keep them out of the dishwasher.

Do not remove keycaps from a laptop. Laptop keys sit on thin scissor or butterfly mechanisms with plastic clips that break on removal and are not sold separately. The same caution applies to low profile membrane keyboards where the caps are clipped rather than socketed. Clean around those keys instead of under them.

Wiping the surfaces

Use isopropyl alcohol at 70 to 99 percent strength. It lifts grease, does not conduct, and evaporates quickly, which is exactly what you want near electronics.

Apply it to a microfibre cloth or a cotton swab, never onto the keyboard. Damp, not wet. Wipe the tops of the keys, then the exposed plate between them, and use a swab for the corners and the edges of each switch. Give the board time to dry fully before reconnecting it.

Two cautions. Alcohol can lift printed legends on cheaper keycaps, so test one key in a corner first and switch to plain water on a cloth if the print smears. And keep alcohol out of the switch housings themselves on a mechanical board, because it strips the factory lubricant from the stem.

Membrane and mechanical boards behave differently

A membrane keyboard sits on a sealed rubber sheet under all the keys. That sheet resists small spills reasonably well but is difficult to clean once anything gets past it, and the keycaps usually are not designed to come off. Treat it as a surface clean, with air underneath.

A mechanical keyboard is more open. Debris reaches the plate easily, and the same openness makes it easy to clean and possible to replace an individual switch on a hot swap board. It also means liquid runs straight to the circuit board.

If you spill liquid

Speed matters more than technique.

1. Unplug or power off immediately and remove the batteries. 2. Turn the keyboard upside down so liquid drains out rather than pooling on the board. On a laptop, tilt it open and inverted like a tent. 3. Do not press the power button to check whether it still works. Current through wet contacts is what actually kills a board, and the damage happens on power, not on contact with water. 4. Blot what you can reach and leave the board inverted somewhere warm and dry for at least twenty four to forty eight hours. Air movement helps; a hot hair dryer does not, because heat warps the plastics.

Test the keys before you trust the keyboard

Cleaning is when keys get knocked loose, seated crookedly, or left pressed under a misaligned cap, and a cable or a switch that came away is easy to miss. Run the keyboard test and sweep every key in order.

Watch for three things: a key that never registers, a key shown as held down when nothing is touching it, and a key that fires twice from one press. Any of those means going back in, usually to re-seat a keycap or a stabiliser. A key that only stays silent under one particular layout is not a cleaning problem at all; check dead keys before you take anything else apart.

A freshly cleaned board deserves something better than test sentences. Kenneth Grahame opens The Wind in the Willows, published in 1908, with the Mole spring cleaning his own house from top to bottom, and those 498 characters are the obvious thing to type once the brushes are put away. William Wordsworth printed I wandered lonely as a Cloud in 1807, and its 412 characters are two short stanzas: enough to hear every switch once and to notice if one of them still sounds wrong. The Echoing Green, from the Songs of Innocence that William Blake issued in 1789, is 483 characters of very short lines, which puts the Enter key through the same check. All three are waiting in the typing test, each with its author, year and source on its own page.

Pick a text

Every passage is in the public domain. Author, year and source stand on its page.

The Wind in the Willows: spring cleaning

Kenneth Grahame · 1908

Kenneth Grahame worked at the Bank of England and rose to be its Secretary before he retired in 1908, the year this book appeared. The story grew out of bedtime tales and letters he wrote for his son Alastair. Spring cleaning drives Mole out of his hole in the first paragraphs, and the river takes over the book from there. President Theodore Roosevelt read it so often that he wrote to Grahame about the animals as if he knew them.

Type this text

I wandered lonely as a Cloud

William Wordsworth · 1807

Wordsworth wrote this poem in 1804 and printed it in Poems, in Two Volumes in 1807. It grew out of a walk beside Ullswater on 15 April 1802 with his sister Dorothy, whose journal describes the flowers. The 1807 version has three stanzas, and the stanza beginning Continuous as the stars was added in 1815. This text follows the 1807 printing on Wikisource.

Type this text

The Echoing Green, the sun does arise

William Blake · 1789

The Echoing Green comes from Songs of Innocence, the set Blake issued in 1789. Blake worked as an engraver by trade and sold his illuminated books directly to a small circle of buyers. The green of the title is the village common where the games are played. The full collection is on Project Gutenberg.

Type this text

More from the blog

Ghosting, N-Key Rollover, Chatter and Double Presses

Ghosting, key blocking, the 6 key USB limit, chatter and double presses are four separate problems. How each one looks and how to check it.

Read the article

What an Online Switch Tester Can and Cannot Measure

Registration, repeats and event timing are measurable in a browser. Actuation force, travel distance and sound are not, whatever a page claims.

Read the article

Dvorak and Colemak Compared With QWERTY

Colemak changes 17 keys from QWERTY, Dvorak rearranges nearly all. Home row contents, relearning cost, and when neither layout is worth it.

Read the article

How to Change and Check the Keyboard Layout in Windows

Two shortcuts change the layout in Windows, and one fires by accident. How to add, remove and confirm a layout before blaming the hardware.

Read the article

Tools

Keyboard test

Press a key and watch it light up. It shows keys that stay silent, keys that fire twice, and how many keys your board reads at once.

Check your keyboard

Typing test

A hundred short texts, from Aesop to the US Constitution. You get speed, accuracy and a map of the keys you keep missing.

Measure your speed