A keyboard key is not working
Press the key in the keyboard test: if it never lights up, the problem is the hardware; if it does light up, the cause is software or your keyboard layout.
Page updated November 26, 2026.
Start with a quick test
Open the keyboard test and press the key that fails. Every key you press lights up on the on-screen keyboard. That one check splits the problem in two: - It never lights up: your computer receives nothing. Think hardware: crumbs, a worn contact, a loose cable or a weak battery. - It lights up, but types nothing elsewhere: the keyboard works. The cause is a program, a layout setting or an accessibility filter. - It lights up only sometimes: an intermittent contact. Dust is the usual suspect, or a wireless keyboard running low on battery.
If the key never lights up
- Unplug the keyboard, turn it upside down over a table and tap it gently. Crumbs under a keycap can block it.
- Clean around the key with a dry brush or a puff of air. A cotton swab barely dampened with isopropyl alcohol can help on stubborn dirt. Our guide to how to clean a keyboard covers the safe method.
- Change the USB port or reconnect the cable. For a wireless keyboard, replace or recharge the battery, move the receiver closer and pair it again.
- Try another keyboard. If the key works there, the first keyboard is the problem.
- On a laptop, plug in an external keyboard. If the external one types fine, the built-in keyboard has failed, and a repair or replacement is often the only fix.
If the key lights up but types nothing
- Check your keyboard layout. A different layout changes which character a key produces. See keyboard typing the wrong characters.
- Try another program. The test reads the physical key, while an app or a game can remap it.
- Turn off remapping tools and macro software for a moment.
- Look at the keyboard accessibility options in your system settings (on Windows, look for Accessibility > Keyboard; on a Mac, the Accessibility section). Features such as Filter Keys or Slow Keys can ignore short or repeated presses. Labels vary by version.
Several keys at once
The test also shows how many keys are held down together. Some budget keyboards only register a few at a time, which is called ghosting. If you play games, this number matters.
If nothing works
If cleaning, another port and another computer change nothing, and the key stays dark in the test, replace the keycap, the switch or the keyboard. On keyboards with removable switches, you may only need the part, so look up your model. Also check the warranty: a failed key on a recent keyboard is often covered.
Sources and updates
- MDN, KeyboardEvent.code: the code names the physical key, whatever the layout.
- How a key test works: the browser receives keydown and keyup events from the page; no keystroke leaves your device.
Page checked on November 26, 2026. Spotted an error? Tell us on the contact page.
Frequently asked questions
How do I know if it's the keyboard or Windows?
Press the key in the keyboard test. If it lights up there but not in your apps, it is software or layout. If it never lights up, it is hardware.
Can a sticky key be fixed?
Often, yes, with careful cleaning. Unplug the keyboard first and avoid soaking it with liquid.
Why does only one key stop working on my laptop?
Dirt or a worn contact under that key is the common cause. Test with an external keyboard to confirm the laptop itself still works.
Run the test
Related questions
Related guides
- How to clean a keyboard without damaging it
- How to type faster: 6 steps to a higher WPM
- How to troubleshoot a device that won't work