What to do when a keyboard key stops working

A stuck or unresponsive key usually means one of three things: debris under the key, a loose mechanical part inside, or a connection problem between the keyboard and your computer. Most of the time you can fix it yourself without replacing the whole keyboard. Start by identifying whether the key is physically stuck (won't move down) or electrically dead (moves but the letter doesn't appear on screen)—the fix is different for each.

If the key moves but nothing happens when you press it, the problem is likely a loose connection or a software glitch. If the key doesn't move at all or feels mushy, something is blocking it or the switch underneath is damaged. The good news is that for mechanical keyboards and most laptop keyboards, you have options before you need to buy a replacement.

Key Takeaways

  • Stuck keys usually come from crumbs or dust trapped under the keycap—compressed air or a gentle pry with a plastic tool can dislodge them without damaging the switch.
  • Unresponsive keys that move but don't register may need the keyboard reseated (unplugged and plugged back in) or the key switch replaced if it's a mechanical keyboard.
  • Laptop keys are harder to repair yourself because the keycap and switch are often glued together, so professional service is usually the safer choice.
  • Before taking apart your keyboard, test it on a different computer or in a different process to rule out a software or driver problem.

Check for debris under the key

The most common reason a key sticks or feels mushy is crumbs, dust, or dried liquid trapped underneath. Start by turning your keyboard upside down and gently tapping it over a trash can or sink to shake loose any debris. Do this for 10 to 15 seconds—you may be surprised what falls out.

If that doesn't work, use a can of compressed air. Hold the keyboard at an angle so the nozzle points under the stuck key, and use short bursts—not a continuous stream, which can push debris deeper. Aim for the gap between the keycap and the keyboard body. Repeat this two or three times, then test the key. Many keyboards recover after this step alone.

If the key still sticks and you have a mechanical keyboard (one where you can see individual switches under each key), you can carefully pry off the keycap. Most mechanical keyboards use keycaps that pull straight up. Place a plastic spoon or a keycap puller (a small tool that comes with some keyboards) under opposite corners of the cap and gently wiggle it upward. Once the cap is off, use compressed air again to blast out the switch underneath, then press the cap back down until it clicks.

Reseat the keyboard connection

If a key moves normally but doesn't register any letter or character on screen, the keyboard may have lost its connection to your computer. This is especially common with wireless keyboards or keyboards that have been bumped or moved recently.

For a wired keyboard, unplug the USB cable from your computer, wait 10 seconds, and plug it back in. Your computer should recognize it automatically. For a wireless keyboard, turn it off, wait 5 seconds, and turn it back on. If your keyboard has a pairing button, press and hold it for 3 seconds while the keyboard is on. Most wireless keyboards reconnect within a few seconds.

After reseating, test the problem key in a text editor or web browser. If it works, you are done. If it still does not respond, move on to the next step.

Test the key in a different process

Before you assume the keyboard is broken, rule out a software problem. Open two different programs—for example, Notepad and your web browser—and test the problem key in each one. If the key works in one program but not the other, the issue is with that specific program, not your keyboard.

You can also test the keyboard on a different computer if you have one available. Plug it in or pair it wirelessly and try the same key. If it works on the other computer, the problem is with your original computer's keyboard driver or settings, not the keyboard itself. If it fails on both computers, the keyboard hardware is the issue.

If the problem is software-related, restart your computer first. If that does not fix it, you may need to reinstall the keyboard driver. On Windows, open Device Manager (search for it in the Start menu), find "Keyboards," right-click on your keyboard, and select "Uninstall device." Restart your computer and Windows will reinstall the driver automatically. On Mac, restart your computer and the driver will reload.

Replace a mechanical switch

If you have a mechanical keyboard and the key still does not work after cleaning and reseating, the switch underneath may be damaged. Mechanical keyboards are designed so you can replace individual switches without replacing the whole board. You will need a switch puller (a small tool that costs $5 to $15) and a replacement switch that matches your keyboard's type.

First, remove the keycap by pulling it straight up with the switch puller or by hand. Then use the switch puller to remove the switch itself—it should slide out of the socket. Take a photo of the switch or note its orientation before you remove it so you know how to install the new one. Insert the new switch into the socket, making sure the two small pins on the bottom of the switch line up with the holes in the socket. Push down until you hear a click. Replace the keycap and test the key.

If you are not sure which type of switch your keyboard uses, check the keyboard's manual or the manufacturer's website. Common types include Cherry MX, Gateron, and Kailh. Replacement switches are sold individually or in packs online. Make sure you order the exact type your keyboard uses, because switches are not always interchangeable.

When to replace the keyboard instead

Laptop keyboards are much harder to repair than mechanical keyboards because the keycap and switch are usually glued or soldered together. If a laptop key is stuck or unresponsive, compressed air and reseating may help, but if those do not work, you will likely need to replace the entire keyboard assembly. This requires opening the laptop, which can void your warranty and risks damaging other parts.

For a laptop, contact the manufacturer's support line or visit an authorized repair shop. Replacement keyboard costs vary widely—from $50 to $200 depending on the model—but a professional can install it without damaging your computer. If your laptop is still under warranty, the repair may be covered.

For a desktop keyboard, a replacement is usually cheaper and faster than repair. A basic wired keyboard costs $15 to $30, and a mechanical keyboard costs $50 to $150. If your keyboard is more than three years old or cost less than $50 originally, replacement is often the smarter choice than spending time on repairs.

Prevent future key problems

Keep your keyboard clean and dry to avoid stuck or unresponsive keys. Eat and drink away from your desk, or at least away from your keyboard. If you do spill liquid on your keyboard, turn it off when ready, unplug it, and let it dry completely for at least 24 hours before using it again. Do not try to use it while wet—you risk damaging the electrical components.

Store your keyboard in a clean, dry place. If you use a keyboard cover, make sure it is designed for your keyboard model so it does not trap heat or moisture. Dust your keyboard once a month with a soft, dry cloth or a can of compressed air. This takes two minutes and can prevent most debris-related problems before they start.

Frequently Asked Questions

Can I fix a key that is physically broken or cracked?

If the keycap itself is cracked or broken, you can replace just the cap without replacing the whole keyboard. Keycaps are sold individually or in sets and cost $5 to $30 depending on the keyboard type. For mechanical keyboards, pull off the broken cap and snap on a new one. For laptop keyboards, the cap is usually glued on, so replacement is more difficult and may require professional help.

What if only one letter appears when I press a key multiple times?

This usually means the key is not making full contact with the switch underneath. Try cleaning under the key with compressed air first. If that does not work and you have a mechanical keyboard, the switch may need to be replaced. If you have a laptop, a professional repair is the safest option.

Is it safe to use rubbing alcohol to clean under a key?

Rubbing alcohol can help dissolve dried sticky residue, but use it sparingly and only on mechanical keyboards where you can remove the keycap. Dampen a cotton swab with isopropyl alcohol (90% or higher), not liquid, and gently wipe around the switch. Let it dry completely before reassembling. Never pour liquid directly into a keyboard, and avoid alcohol on laptop keyboards because it can seep into sealed components.

Why does my key work sometimes but not other times?

An intermittent key usually means the switch is making poor contact or there is a loose connection. Reseat the keyboard first by unplugging and replugging it. If the problem continues, the switch may be failing and will likely get worse over time. For a mechanical keyboard, replace the switch. For a laptop, contact the manufacturer because the problem may be a loose cable inside the keyboard assembly.

Can I use my keyboard while waiting for a replacement key switch to arrive?

Yes, you can use the keyboard normally while one key is removed or broken. The missing key will not damage anything else. Just be aware that you will not be able to type that character until you replace the switch or keycap. If the broken key is one you use often, like the spacebar or Enter, you may want to order the replacement quickly.