The fastest way to unlock a stuck keyboard

A locked keyboard usually means one of three things: you have turned on Num Lock or Caps Lock accidentally, Windows has frozen the keyboard input, or a program is blocking it. The quickest fix is to press Num Lock or Caps Lock again — these keys toggle on and off, and if one is on, your typing will behave strangely or not register at all.

If that does not work, try pressing Ctrl + Alt + Delete to open the Windows security screen. This works even when the keyboard appears frozen, because it forces Windows to respond. From there, you can restart your computer or close a program that may be blocking keyboard input. If nothing happens after you press those keys, move to the next section.

Key Takeaways

  • Press Num Lock or Caps Lock to toggle them off — these keys are the most common reason a keyboard stops working as expected.
  • Ctrl + Alt + Delete opens the Windows security screen even when the keyboard seems unresponsive, letting you restart or close frozen programs.
  • Unplugging a USB keyboard and plugging it back in often fixes the problem without restarting your computer.
  • If your keyboard is wireless, check that the batteries are not dead and the receiver is plugged in and within range.
  • Restarting Windows in Safe Mode can help you identify whether a program or driver is causing the lock.

Restart your computer to clear keyboard freezes

If Num Lock and Caps Lock are both off and Ctrl + Alt + Delete did not work, restart your computer. A restart clears temporary files and resets hardware connections, which fixes most keyboard lockups. Save your work first if you can, then hold down the power button on your computer for ten seconds until it shuts down completely.

Wait thirty seconds, then press the power button again to turn it back on. When Windows loads, test your keyboard by typing in a text editor or search box. If the keyboard works again, the problem was a temporary freeze and you are done. If it still does not work, move to the next section.

Unplug and reconnect a USB keyboard

If you are using a wired USB keyboard, unplug it from the back or side of your computer. Wait ten seconds, then plug it back in. Windows will detect it again and reinstall the connection, which often fixes a stuck or unresponsive keyboard without needing a full restart.

Plug the keyboard into the same port if possible, or try a different USB port on your computer. Avoid USB hubs if you have one — plug directly into the computer instead. Test the keyboard by typing something. If it works, you are done. If it still does not respond, the keyboard itself may be damaged and you may need to replace it.

Check wireless keyboard batteries and connection

A wireless keyboard that stops responding is usually out of batteries or out of range. Open the battery compartment on the back or bottom of the keyboard and check the batteries. If they are dead or low, replace them with fresh ones of the same type and size. Most wireless keyboards use AA or AAA batteries.

After replacing the batteries, make sure the wireless receiver — the small USB dongle — is plugged into your computer and within three feet of the keyboard. If the receiver is plugged into a USB hub or extension cable, try plugging it directly into the computer instead. Some keyboards have a pairing button on the receiver or keyboard itself; press it to reconnect them. Test the keyboard again.

Restart Windows in Safe Mode to find the problem program

If your keyboard works when you first start your computer but locks up after a few minutes, a program or driver is likely blocking it. Restart your computer in Safe Mode, which loads only the essential Windows files and drivers. To do this, restart your computer and press F8 repeatedly as it starts up, before the Windows logo appears. You should see a menu with boot options.

Select "Safe Mode" from the menu and press Enter. Windows will load with a plain black background and fewer programs running. Test your keyboard — if it works in Safe Mode, a program you normally run is causing the problem. Restart your computer normally and uninstall any recently installed programs or keyboard software. If the keyboard still locks in Safe Mode, the problem is a Windows driver, and you may need to contact the keyboard manufacturer or a technician.

Update or reinstall keyboard drivers

A keyboard driver is the software that tells Windows how to communicate with your keyboard. If the driver is outdated or corrupted, your keyboard may lock or stop responding. To check and update drivers, right-click the Start button and select "Device Manager." Look for "Keyboards" in the list and click the arrow next to it to expand it.

Right-click the keyboard listed there and select "Update driver." Choose "Search automatically for updated driver software" and let Windows search for a newer version. If Windows finds one, it will install it and ask you to restart. If no update is found, right-click the keyboard again and select "Uninstall device," then restart your computer. Windows will reinstall the driver automatically when it starts up. This often fixes keyboard problems caused by corrupted drivers.

Check for Windows updates and malware

An outdated version of Windows can cause keyboard problems, especially if you have not restarted your computer in a long time. Open Settings by pressing the Windows key and typing "Settings," then click "Update & Security." Click "Check for updates" and let Windows read and install any available updates. You will need to restart your computer when it is done.

Keyboard lockups can also be caused by malware. Run a full scan with Windows Defender, which is built into Windows. Press the Windows key, type "Windows Security," and open it. Click "Virus & threat protection," then "Scan options," and select "Full scan." Let the scan run completely — it may take an hour or more. If malware is found, Windows Defender will remove it and ask you to restart.

Frequently Asked Questions

Why does my keyboard lock when I press certain keys?

Num Lock and Caps Lock are the most common culprits. Num Lock locks the number pad on the right side of your keyboard, and Caps Lock locks all letters to uppercase. Both toggle on and off with a single key press. Check the small lights on your keyboard — if one is lit, that key is on. Press it to turn it off.

Can a keyboard lock itself if I spill something on it?

Yes. Liquid can cause keys to stick or short-circuit the keyboard. If you spilled something, unplug the keyboard when ready and let it dry completely for at least 24 hours before using it again. If it still does not work after drying, the keyboard may be permanently damaged and need replacement.

What if only certain keys are locked or not working?

If only a few keys do not work, the keyboard may be damaged or dirty. Try cleaning around the stuck keys with a can of compressed air, holding the keyboard upside down. If that does not help, those keys may be broken and the keyboard may need replacement. If all keys work except one or two, it is usually cheaper to replace the keyboard than to repair it.

Does locking the keyboard protect my computer from theft?

No. Locking the keyboard only stops the keyboard from working — it does not protect your computer or files. If you want to prevent someone from using your computer, use Windows password protection or lock your screen by pressing Windows key + L. This requires a password to unlock.

Why does my keyboard lock after my computer goes to sleep?

When your computer wakes from sleep, the keyboard connection sometimes does not resume properly. Move your mouse or press a key to fully wake the computer, then try the keyboard again. If it still does not work, unplug and replug a USB keyboard, or replace the batteries in a wireless keyboard.