Why your MacBook turns on when you clean the keyboard
You shut it down, you start wiping, and the screen lights up. Here is why, and what to do about it.
Last updated: October 2026
The short answer
Many MacBooks turn on when a key or the trackpad is pressed, even after a full shutdown. Apple describes turning on a Mac laptop with its keyboard or trackpad as a normal ability, and its startup setting leaves it in place. So wiping the keys of a shut-down MacBook can start it up. It is expected behavior, not a fault, and it varies by model.
What Apple’s setting changes, and what it does not
On a Mac laptop with Apple silicon running macOS Sequoia 15 or later, Apple offers Terminal commands that stop the Mac from starting up when you open the lid or connect power:
- Lid and power:
sudo nvram BootPreference=%00 - Lid only:
sudo nvram BootPreference=%01 - Power only:
sudo nvram BootPreference=%02 - Undo:
sudo nvram -d BootPreference
Apple says these commands work without affecting your ability to turn on your Mac using its keyboard or trackpad. They do not solve the cleaning problem, and we did not find an Apple setting that does.
What to do instead
- For a dry clean, leave the Mac on and lock the keyboard and trackpad. A key press then does nothing to your open apps.
- For a damp clean, shut down and unplug the Mac first, as Apple recommends, and dampen a soft, lint-free cloth with water only.
- If the Mac starts up during a damp clean, stop and shut it down again before you continue.
- Never spray liquid directly on the computer.