How to Lock Your Keyboard (Windows, Mac & Chromebook)

Disclosure: This post may contain affiliate links. If you purchase through these links, we may earn a small commission at no extra cost to you.
The fastest way to lock your keyboard is to lock your whole session: Win+L on Windows, Control+Command+Q on a Mac, or Search+L on a Chromebook. None of the three operating systems has a dedicated "keyboard only" lock switch — what you're actually doing in every method below is either locking the whole session or handing the keyboard to a small utility that intercepts its input. Pick based on why you're locking it.
Just want to clean the keyboard or keep the cat off it? Lock the whole session
If the goal is temporary — wiping down keys, a toddler watching a video, a cat walking across the laptop — locking the session is the zero-install answer, and it's the one most searchers actually want.
- Windows 11/10: Press Win+L. The screen locks immediately; nothing typed on the keyboard does anything except (eventually) type your password on the sign-in screen. To undo it, click anywhere or press a key, then enter your PIN or password.
- Mac: Press Control+Command+Q. The screen locks the same way. Type your password to get back in.
- Chromebook: Press Search+L (the magnifying-glass/Search key, not the Windows key). Enter your password or PIN to unlock.
This doesn't disable the keyboard hardware — it just makes keystrokes meaningless until someone enters the password. That's a feature: if a toddler mashes keys or a cat sits on the keyboard, nothing happens to your open documents or browser tabs.
Want the keyboard usable by mouse only, without a password prompt?
Session lock works but forces a password re-entry, which is annoying if you're the one who needs the mouse to keep working (e.g., wiping the keys with your other hand). For that, a small utility that blocks keyboard and mouse input — then unlocks on a key combo — is the better fit.
KeyFreeze (Windows) is the simplest option: click one button, a five-second countdown runs, and keyboard plus mouse input freezes. Press Ctrl+Alt+Del to unlock instantly — that combo is hard-wired at the OS level, so it always works even while KeyFreeze is active. It's a tiny, portable .exe from Sordum, currently at version 1.4. Fair warning: the tool hasn't been updated in years, so test it once before you rely on it, and only download it from Sordum's own site — third-party download mirrors for old freeware are a common malware vector.
If you'd rather not run an old, unmaintained .exe, a short AutoHotkey script does the same job and you can read every line before running it: install AutoHotkey, then a script that suspends keyboard/mouse input on a hotkey (Ctrl+Alt+K is a common binding in shared scripts) and un-suspends on the same key. It's DIY, but it's transparent about what it's doing — worth the extra ten minutes if you're wary of installing lock software from a stranger.
Mac: there's no equivalent lock-without-password utility built in. KeyboardCleanTool by folivora.ai (the team behind BetterTouchTool) is free and still maintained — it disables keyboard input for as long as its window is open, so you can wipe down keys without triggering Spotlight or closing your browser tab by accident. Click the window closed, or hit Esc, to restore the keyboard. If you just want the mouse still active while cleaning, Control+Command+Q session-lock is otherwise your only built-in option.
Chromebook: there's no built-in accessibility toggle that disables the physical keyboard specifically — accessibility settings only add an on-screen keyboard, they don't remove the hardware one. Search+L session lock is the practical answer here.
Want to disable the keyboard for longer — a broken key, a kid's shared PC, an external keyboard you don't use
If you need the keyboard off for more than a cleaning session — a sticky key that's misfiring, or a laptop a young kid uses that should be mouse/touch-only — that's a step up from "lock," and we cover it in depth, including the Device Manager method and its real behavior, in our dedicated guide to disabling a laptop keyboard. Short version: uninstalling the keyboard in Device Manager disables it until you manually reinstall it or restart — Windows redetects and reinstalls the driver automatically the next time you reboot or run "Scan for hardware changes," so it's not a way to permanently disable a keyboard without touching it again.
If it's an external keyboard on a desktop, the honest answer beats any software: unplug it. A wireless one, turn it off or pull the receiver. No driver tricks required.
The reverse problem: keyboard seems locked and won't type
A lot of people land here because their keyboard already seems locked, not because they want to lock it. Two usual suspects, both fixable in under a minute:
- Filter Keys is on. This is a Windows accessibility feature that ignores repeated or held-down keystrokes — turned on accidentally by holding the right Shift key for 8 seconds, which is its default trigger. If keys are missing letters, doubling up, or not registering on first press, check Settings > Accessibility > Keyboard and turn Filter Keys off.
- Fn Lock is toggled. This swaps whether F1–F12 act as media/brightness keys or standard function keys — it's a firmware-level toggle, not a keyboard lock, and it varies by brand (commonly Fn+Esc on Lenovo, Fn+Left Shift or an Action Key in BIOS on HP). If F-keys are doing the wrong thing rather than nothing at all, this is almost always the cause. We cover it brand by brand in locking and unlocking the Fn key.
If neither explains it and keys genuinely produce nothing, that's a hardware or driver problem, not a lock — see our laptop keyboard not working troubleshooting guide.
Frequently asked questions
Can you lock a keyboard? Not the keyboard alone, at the OS level — Windows, macOS, and ChromeOS all lock the session instead. A third-party tool like KeyFreeze or KeyboardCleanTool gets closer to a true keyboard-only lock without a password prompt.
How do I lock my keyboard on Windows 10 or 11? Press Win+L to lock the whole session (fastest, no install). For keyboard-only locking that leaves the mouse free, use a small utility like KeyFreeze. Windows 10 reached end of support in October 2025, but both methods work identically on 10 and 11.
How do I lock keys on my keyboard, like just the number pad? That's a different, narrower question than locking the whole keyboard — see the Num Lock toggle on your specific laptop (commonly Fn+F11 or Fn+Num Lock, brand-dependent) if that's what you're after. It doesn't lock the rest of the keyboard.
Does locking the keyboard stop a toddler from getting into my computer? Session lock (Win+L) does, because it requires a password to get back in. A freeze tool like KeyFreeze doesn't add password protection — anyone who knows the unlock combo (Ctrl+Alt+Del) can get back in, so it's meant for supervised situations, not security.
Why did my keyboard stop working out of nowhere? Check Filter Keys and Fn Lock first — both are easy to trigger by accident and both look like a "locked" keyboard. If those aren't it, see our keyboard not working guide.
For a spill or a genuinely sticky key, a can of compressed air does more good than any software lock — check current options on Amazon.

Tech enthusiast and founder of Technize. Passionate about making technology accessible and helping people make smarter buying decisions.