MainspringGuides › Disable keyboard & trackpad
macOS Guide

How to Disable the Keyboard and Trackpad on a Mac

Updated July 2026 · 2 min read

Whether you're wiping the keys, keeping a cat off the desk, or handing the Mac to a toddler for a video, you sometimes need the keyboard and trackpad to simply stop responding for a few minutes. macOS won't do it on its own — here's what actually works.

macOS has no built-in toggle

There is no switch in System Settings and no Terminal command to disable the keyboard or trackpad on demand. macOS keeps input live by design. The routes people reach for — locking the screen or sleeping the display — each solve only half the problem.

What the built-in options really do

The closest built-in trick is to lock the screen: press Control-Command-Q. macOS drops to the login window, so anything you type lands in the password field instead of your documents. It is better than nothing, but it was never meant for cleaning: the login screen is bright (useless for spotting dust), the trackpad still moves the pointer, and mashing keys enters a stream of wrong passwords — which can trigger a lockout delay or a Touch ID prompt in the middle of your wipe.

You can also put just the display to sleep — Control-Shift-Power on Macs with Touch ID, or Control-Shift-Eject on older keyboards. The screen goes dark, but the very first key or trackpad touch wakes it straight back up, so it does not actually hold through a cleaning.

Notice what's missing from both: neither reliably stops the trackpad and the keyboard at the same time for a set stretch of time. Locking the screen still lets the pointer roam; sleeping the display wakes on the first touch.

Disable the keyboard and trackpad together

Mainspring's Clean Mode intercepts both at once. While it's active, every keypress, mouse click, and trackpad gesture is swallowed before it reaches any app:

  1. Open Mainspring from your menu bar and choose Clean keyboard, or open the main window and find the Clean Mode card under Power.
  2. The first time, macOS asks for Accessibility access — that permission is what lets an app intercept key presses and clicks. Click Open Accessibility Settings, switch Mainspring on, and try again. You only do this once.
  3. Pick how long you need: 30 seconds, 1 minute, or 3 minutes.
  4. The screen dims to near-black and every keypress, click, and trackpad swipe is ignored. Wipe away.
  5. Input comes back on its own when the timer ends — or hold Esc for about three seconds to finish early.

It needs one-time Accessibility permission because intercepting input is a privileged thing to do — no admin password, just a per-app switch you grant once in System Settings.

Re-enabling input

There are three ways out, so you can never get stuck:

Lock both, on a timer

Mainspring's Clean Mode is the missing toggle: it disables the keyboard and the trackpad together for 30 seconds to 3 minutes, then re-enables them automatically. One click from the menu bar.

Try Mainspring free →

Signed & notarized by Apple · 1-day free trial · $29 once