How to lock your Mac keyboard to clean it

Short answer

macOS has no keyboard lock. The safest way to clean is Apple’s own: shut down the Mac and unplug it, and nothing you press can do anything. For a quick wipe with the Mac on, Lock Screen (Control-Command-Q) hides your work, but the keys still type into the password field. PawLock’s Clean mode covers every screen, catches the keys and clicks, and unlocks by itself after 30 seconds, 1 minute or 2 minutes.

Updated

The safest way: shut down

Apple’s cleaning instructions for every MacBook start the same way: shut down the computer and unplug the power adapter. With the Mac off, a wipe can’t type, click or delete anything.

  1. Save your work

    Save and close anything you’re working on.

  2. Shut down

    Choose Apple menu › Shut Down and wait until the screen goes dark.

  3. Unplug

    Unplug the power adapter, and any other cables and devices.

  4. Clean

    Use a soft, lint-free cloth the way Apple describes: how to clean a MacBook keyboard and screen.

What it costs: a restart, and the time to open everything again. It’s the right call for a proper clean, and a lot of ceremony for a few crumbs.

With the Mac on: Lock Screen

Press Control Command Q, or choose Apple menu › Lock Screen. Your windows disappear behind the login screen.

What it leaves open: the keys still go to the password field, so wiping the keyboard types into it, and a swipe across Return tries whatever was typed as your password. The pointer still moves. Fine for a quick dusting, not made for scrubbing.

With the Mac on: PawLock’s Clean mode

Clean mode is made for exactly this: it covers every screen with a plain cleaning view, locks the keyboard, trackpad and mouse, and counts down.

  1. Pick the time

    Click the paw in the menu bar and choose 30 s, 1 min or 2 min. One minute is the default.

  2. Pick the screen

    Choose cream, black or white. Black and white make dust and smudges easier to spot.

  3. Click Clean

    Every screen fills with the cleaning view and the countdown starts. Keys and clicks land on PawLock instead of your apps.

  4. Wipe

    Use a soft, lint-free cloth. Never pour or spray liquid onto the keyboard.

  5. Let it finish

    At zero, PawLock unlocks by itself. To stop early, type U-N-L-O-C-K.

Changed your mind about the colour halfway through? Click one of the three swatches on the cleaning screen. They’re the only thing on it that reacts to a click. After the first time, Control Option L locks in the mode you used last.

What still gets through

The power button and the Touch ID key always work: macOS handles them before any app. Wipe that corner gently.

Some system keys, such as brightness and volume, may be handled by macOS before any app sees them.

PawLock’s Self-test shows what reaches it on your Mac. Run it once before your first big clean.

While a lock is on, PawLock asks macOS to hide the Dock and the menu bar and to turn off app switching, Force Quit and Log Out.

Which one to use

MethodMac stays onWhere the keys goEnds
Shut downNoNowhereWhen you turn it on
Lock ScreenYesThe password fieldWhen you log in
PawLock Clean modeYesPawLock, which ignores them (see above for the exceptions)After the countdown, or when you type unlock

Questions

Is it safe to clean the keyboard while the Mac is on?

Apple’s instructions say to shut down and unplug first, and that’s the safest choice. With the Mac on, stick to a soft, lint-free cloth, and never spray anything onto the keyboard.

Does Lock Screen stop the keyboard?

No. It hides your work behind the login window, but the keys type into the password field there.

Can I wipe the trackpad too?

Yes. In Clean mode, clicks and taps land on PawLock. The only things on the cleaning screen that react are the three colour swatches, and they just change the background.

How long should the countdown be?

As long as the wipe takes. Pick 2 minutes if you’re not sure: you can always finish early by typing unlock.

Sources

PawLock for Mac

Clean mode covers every screen and counts down while you wipe. Cat mode puts a see-through shield over the screen, and you unlock it by typing unlock or holding the paw.

Coming soon to the Mac App StoreSee how it works

macOS 14 Sonoma or later · Apple silicon and Intel