Why Your Keyboard Locks and How to Fix It

A locked keyboard usually means one of three things: the Num Lock or Caps Lock key is on, a keyboard driver needs restarting, or your operating system has activated an accessibility feature. The fix depends on which one is happening. Start by checking the lights on your keyboard — if Num Lock or Caps Lock is lit, press that key to turn it off. If the lights are off and keys still do not respond, try restarting your keyboard driver or checking your accessibility settings.

Most keyboard locks are accidental and take less than a minute to undo. The steps below cover Windows and Mac separately, since the menus are different. If you are using a laptop, the process is the same — just look for the Num Lock or Caps Lock indicator on your screen instead of on the keyboard itself.

Key Takeaways

  • Check whether Num Lock or Caps Lock is lit on your keyboard; if either is on, press that key to unlock it.
  • On Windows, restart your keyboard driver by opening Device Manager, finding Keyboards, right-clicking your keyboard, and selecting Uninstall Device.
  • On Mac, restart your computer or check System Settings > Accessibility > Keyboard to see if Sticky Keys or Slow Keys is turned on.
  • If an external keyboard is locked but your laptop keyboard works, the external keyboard may need new batteries or a USB reconnection.
  • Holding Shift while pressing Num Lock or Caps Lock will unlock it even if the key itself is not responding.

Check the Lock Lights on Your Keyboard

Look at the top right corner of your keyboard. Most keyboards have three small lights that show the status of Num Lock, Caps Lock, and Scroll Lock. If any of these lights are on, that key is active and locking part of your keyboard.

Num Lock locks the number pad on the right side of your keyboard. When it is on, the number keys produce numbers instead of navigation commands (like Page Up or Home). Press the Num Lock key once to turn it off. On laptops, Num Lock is often accessed by holding Fn and pressing the Num Lock key, which may be labeled on another key.

Caps Lock locks all letter keys to uppercase. Press Caps Lock once to turn it off. You will see the light go out. Scroll Lock is rarely used in modern programs, but if it is on, press Scroll Lock to turn it off.

If the lights are off and your keyboard is still not responding, move to the next section.

Restart Your Keyboard Driver on Windows

A keyboard driver is the software that tells Windows how to read your keyboard. If the driver stops responding, your keyboard will lock even though nothing is physically wrong. Restarting the driver usually fixes this in seconds.

Open Device Manager by right-clicking the Start button and selecting Device Manager. Look for the category called Keyboards and click the arrow next to it to expand the list. You will see your keyboard listed — it may say "Standard PS/2 Keyboard" or show the brand name if it is a wireless or gaming keyboard.

Right-click your keyboard and select Uninstall Device. A dialog will appear asking you to confirm. Click Uninstall. Windows will remove the driver. Now unplug your keyboard from the USB port (or turn it off if it is wireless) and wait 10 seconds. Plug it back in or turn it back on. Windows will automatically reinstall the driver, and your keyboard should respond again.

If you have a laptop keyboard that is not responding, the same process works — just look for the built-in keyboard in the Keyboards category and uninstall it the same way.

Check Accessibility Settings on Mac

Mac has accessibility features that can lock your keyboard if they are turned on. The most common ones are Sticky Keys (which lets you press modifier keys like Shift one at a time instead of holding them) and Slow Keys (which ignores rapid key presses).

Open System Settings and go to Accessibility. Click Keyboard on the left side. Look for Sticky Keys and Slow Keys. If either one has a toggle switch that is on, click it to turn it off. Close System Settings and test your keyboard.

If your keyboard is still locked, restart your Mac. Click the Apple menu in the top left, select Restart, and wait for your computer to boot back up. This will reset any keyboard processes that may have frozen.

Reconnect an External Keyboard

If you are using an external keyboard (not your laptop keyboard) and it is locked, the problem may be a loose connection or dead batteries rather than a software lock.

For a wired USB keyboard, unplug it from the USB port and plug it back in. Wait a few seconds for Windows or Mac to recognize it. For a wireless keyboard, check that the batteries are not dead — replace them with fresh ones. If your keyboard has a power switch, turn it off and back on. If it connects via Bluetooth, forget the keyboard in your Bluetooth settings and pair it again.

Test a few keys after reconnecting. If the keyboard still does not respond, try plugging it into a different USB port or connecting it to a different computer to see if the keyboard itself is broken.

Force Unlock Num Lock or Caps Lock

If Num Lock or Caps Lock is on but the key itself is not responding, you can unlock it using a keyboard shortcut. Hold down the Shift key and press Num Lock or Caps Lock. This will toggle the lock off even if the key is stuck or not registering.

On some keyboards, especially older ones, the lock keys can physically stick. If the shortcut does not work, try pressing the lock key several times in quick succession, or gently tap around the key to see if something is blocking it. If the key is physically broken, you may need to replace the keyboard.

What to Do If Nothing Works

If you have tried all the steps above and your keyboard is still locked, the problem may be a hardware failure or a deeper software issue. Try these final steps before replacing the keyboard.

On Windows, open Command Prompt as Administrator (right-click Command Prompt and select Run as Administrator). Type sfc /scannow and press Enter. This will scan your system files and repair any that are corrupted. The scan takes 10 to 15 minutes. Restart your computer when it finishes.

On Mac, restart in Safe Mode by shutting down, turning the computer back on, and holding Shift until you see the login screen. Log in and test your keyboard. If it works in Safe Mode, a third-party app may be interfering. Restart normally and check which apps you installed recently.

If your keyboard works in Safe Mode but not in normal mode, uninstall any recently installed software and restart. If your keyboard does not work even in Safe Mode, the keyboard hardware is likely broken and will need to be replaced.

Frequently Asked Questions

Why does my keyboard lock every time I turn on my computer?

This usually means Num Lock or Caps Lock is set to turn on automatically when your computer starts. Check your BIOS settings (restart your computer and press Delete, F2, or F12 during startup — the key varies by manufacturer) and look for a Num Lock or Keyboard settings option. Set it to Off.

Can a virus lock my keyboard?

Malware can interfere with your keyboard, but it is rare. If you suspect a virus, run a full scan with Windows Defender (on Windows) or Malwarebytes. If your keyboard locks only when you visit certain websites, your browser may have a problem — try a different browser to test.

My laptop keyboard is locked but my external keyboard works. What does that mean?

Your laptop keyboard driver may need restarting, or the keyboard itself may be damaged. Follow the Device Manager steps above to uninstall and reinstall the laptop keyboard driver. If that does not work, your laptop keyboard hardware may be failing and will need professional repair.

Is there a keyboard shortcut to unlock my keyboard?

Holding Shift and pressing Num Lock or Caps Lock will toggle those locks. For a completely frozen keyboard, there is no universal shortcut — you will need to use your mouse to access Device Manager or System Settings and restart the driver.

What if my keyboard is locked and I cannot use my mouse?

Use Tab to navigate through menus and Enter to select options. On Windows, press Alt+Tab to switch between open windows, then use Tab and arrow keys to reach Device Manager. On Mac, press Command+Space to open Spotlight, type Device Manager or System Settings, and use arrow keys to navigate.