Start with the simplest fixes first

Most keyboard problems are not hardware failures—they are loose cables, turned-off wireless connections, or stuck keys. Before you order a replacement, try these steps in order: check that the cable is fully plugged in (or the batteries are fresh if wireless), restart your computer, and look for debris under the keys. Nine times out of ten, one of these solves the problem in under five minutes.

If your keyboard is partially working—some keys respond and others do not—the issue is usually physical debris or a driver that needs updating, not a dead keyboard. A full keyboard failure where nothing responds at all points to a connection problem first, then a driver issue, then hardware damage.

Key Takeaways

  • Check the cable connection or battery level before assuming the keyboard is broken.
  • Restart your computer to clear temporary driver glitches that prevent key presses from registering.
  • Clean under the keys with compressed air or a thin brush if some keys stick or do not respond.
  • Update or reinstall your keyboard driver through Device Manager (Windows) or System Report (Mac) if keys work but feel unresponsive.
  • Test with a different keyboard to confirm whether the problem is the keyboard itself or your computer's connection.

Check the physical connection

For a wired keyboard, follow the cable from the keyboard to your computer. Push the connector firmly into the USB port or PS/2 port until you hear or feel a click. If the port is loose or the connector is bent, try a different USB port on your computer. Some ports deliver power inconsistently, especially if they are on the front of the case or on a hub.

For a wireless keyboard, open the battery compartment on the back and check that the batteries are installed correctly (the + and − ends should match the diagram inside the compartment) and that they have charge. Replace them with fresh batteries even if they feel like they might still work—weak batteries are the most common reason wireless keyboards stop responding. Also check that the wireless receiver (a small USB dongle) is plugged into your computer and not blocked by other devices or metal objects.

If you have a Bluetooth keyboard, make sure Bluetooth is turned on in your computer's settings. On Windows, open Settings > Devices > Bluetooth and toggle it on. On Mac, go to System Settings > Bluetooth and check that it is enabled. Then look for your keyboard in the list of devices and click it to reconnect.

Restart your computer

A restart clears temporary software glitches that can prevent your keyboard from working even though the hardware is fine. Shut down your computer completely, wait 10 seconds, and turn it back on. Do not use Sleep or Restart from the menu if the keyboard is not responding—hold the power button for 10 seconds until the computer shuts down, then press it again to start up.

While the computer restarts, your operating system reloads the keyboard driver (the software that translates key presses into text). If the driver was stuck or corrupted, a restart fixes it. This solves most keyboard problems that happen suddenly after the computer has been running for hours or days.

Clean debris from under the keys

Dust, food crumbs, and hair under the keys are the most common reason individual keys stick or stop responding. Turn off your keyboard (or unplug it if wired) and hold it upside down over a trash can. Tap the back gently to dislodge loose debris. Then use a can of compressed air held upright, and spray short bursts between the keys, moving across the entire keyboard. Hold the can 3 to 4 inches away and do not shake it—shaking can spray liquid into the keyboard.

For keys that still stick after compressed air, use a thin, stiff brush (an old toothbrush works) to gently brush between the keys and under the edges. Do not pry the keys off unless you are comfortable reassembling them—modern keyboards often have small springs that are straightforward to lose. If one key is stuck and cleaning does not free it, that key may need replacement, but the rest of the keyboard should still work.

Update or reinstall the keyboard driver

The keyboard driver is the software that tells your computer how to read key presses. If it becomes corrupted or outdated, keys may not register even though the keyboard is physically fine. On Windows, right-click the Start button, select Device Manager, and look for "Keyboards" in the list. Click the arrow next to it to expand the list, then right-click your keyboard and select "Update driver." Choose "Search automatically for updated driver software" and let Windows search for the latest version.

If updating does not work, right-click the keyboard again and select "Uninstall device." Restart your computer. Windows will automatically reinstall the driver when it starts up, and this fresh installation often fixes problems that an update alone does not solve.

On Mac, keyboard drivers are built into the operating system and cannot be updated separately. If your keyboard is not working, go to System Settings > General > Software Update and install any available updates. If that does not help, restart your Mac and hold Command + Option + P + R until you hear the startup sound twice—this resets the firmware and can fix keyboard connection issues.

Test with a different keyboard

Borrow a keyboard from a friend or use a phone or tablet with a Bluetooth keyboard to test whether the problem is your keyboard or your computer. Plug the borrowed keyboard into the same port your keyboard uses (or pair it via Bluetooth). If the borrowed keyboard works perfectly, your original keyboard is the problem and may need replacement. If the borrowed keyboard has the same issue, the problem is your computer's connection or driver, and the steps above should have fixed it.

If you do not have access to another keyboard, you can test using your computer's on-screen keyboard. On Windows, search for "On-Screen Keyboard" in the Start menu and open it. Click the keys with your mouse to see if they register. On Mac, go to System Settings > Accessibility > Keyboard and turn on "Enable Sticky Keys" or use the Keyboard Viewer (open Spotlight with Command + Space, type "Keyboard Viewer," and press Enter). If the on-screen keyboard works but your physical keyboard does not, the problem is definitely your keyboard hardware.

When to replace your keyboard

If you have tried all the steps above and your keyboard still does not work, or if only one or two keys are permanently broken and you cannot live without them, replacement is the next step. Mechanical keyboards (with individual switches under each key) are often repairable—you can buy replacement switches and swap them out—but membrane keyboards (the most common type) are not economical to repair. A new keyboard costs between $15 and $150 depending on the type and brand.

Before you buy, confirm what type of connection your computer needs: USB wired, USB wireless with a dongle, or Bluetooth. Check the port on your computer (USB-A, USB-C, or neither for Bluetooth-only). If your computer is very old, it may have a PS/2 port instead of USB, which limits your options. Most modern computers accept any USB keyboard, so compatibility is usually not a concern.

Frequently Asked Questions

Why does my keyboard work sometimes but not always?

Intermittent keyboard problems usually mean a loose cable connection, weak batteries in a wireless keyboard, or a driver that loads inconsistently. Try reseating the cable firmly, replacing the batteries, or updating the driver. If the problem happens only when you type fast, the keyboard may be overheating—give it a few minutes to cool down before using it again.

How do I know if my keyboard driver is broken?

Open Device Manager (Windows) or System Report (Mac) and look for your keyboard in the list. If it has a yellow warning triangle or says "Unknown Device," the driver is missing or corrupted. If it appears normally with no warning, the driver is probably fine and the problem is physical. Reinstalling the driver (as described above) fixes most driver problems.

Can I fix a key that types the wrong letter?

A key that types the wrong letter usually means the keyboard driver has mapped that key incorrectly, or the key itself is damaged. Try restarting your computer first. If that does not work, check your keyboard settings in System Settings (Mac) or Settings > Devices > Keyboard (Windows) to see if you can remap the key. If remapping does not help, the key switch is probably damaged and the keyboard needs replacement.

What should I do if my keyboard got wet?

Unplug the keyboard when ready and do not use it. Let it dry completely in a warm, dry place for at least 24 hours—a sunny windowsill or near (not on) a heat vent works well. Do not use a hair dryer, as the heat can damage the circuit board. After 24 hours, plug it in and test it. If it still does not work, the water may have corroded the circuits and the keyboard cannot be repaired.

Is it worth fixing a keyboard or should I just buy a new one?

If the problem is a driver, connection, or cleaning, fixing it costs nothing and takes under an hour. If the problem is a broken key or water damage, replacement is usually cheaper than repair. A basic wired keyboard costs $15 to $30, so unless your keyboard is high-end or mechanical, replacement is the practical choice.