Blog · September 22, 2026 · 7 min read
How to Lock Your Mac's Keyboard and Mouse While Keeping the Screen On
Search "lock Mac keyboard" and you'll find the same disappointing answer everywhere: macOS has no built-in way to disable input while the screen stays on. The lock screen (⌃⌘Q) blanks your display. Closing the lid puts the Mac to sleep. And the infamous "open TextEdit and let the keys land there" trick protects nothing at all.
Whether you're wiping crumbs off your keyboard, leaving a build running, or walking away from an hour-long AI agent session, the problem is the same: you want the display alive and the inputs dead. Here's every real option in 2026, from free single-purpose tools to a full walk-away lock.
Why macOS can't do this natively
Apple's lock screen is built around one assumption: a locked Mac is an unattended Mac, and an unattended Mac should show nothing. That made sense before laptops became long-running agent workstations. Today a Mac often has something worth watching — a compile, a deploy, a Claude Code run, a render — while nobody should be able to touch it. The two built-in options each solve half the problem:
- Lock screen (⌃⌘Q): input is safe, but the display goes dark. You can't glance over and check progress.
- Leaving it unlocked: everything stays visible, and anyone who sits down owns your machine.
Option 1: KeyboardCleanTool (free, cleaning only)
From the maker of BetterTouchTool, KeyboardCleanTool disables the keyboard and optionally the trackpad so you can wipe them down. It's excellent at its one job. But it's a cleaning tool, not a lock: the screen and every app stay fully exposed, the mouse still works unless you disable it too, and anyone can simply click the big "unlock" button in the middle of the screen. Zero protection when you walk away.
Option 2: Amphetamine + lock screen (visible to nobody)
Some people combine a keep-awake utility with the regular lock screen, hoping the display stays on. It doesn't help: the lock screen still replaces your windows, so your terminal output is hidden either way. Keep-awake tools solve display sleep, not display privacy logic.
Option 3: Third-party input lockers
A handful of utilities (CleanMode, MacWipe, KeyboardLocker) block input system-wide while the screen stays on. Most are built for the cleaning use case: they block input, and that's it. What they don't do is handle the walk-away scenario — your Slack, email and browser stay readable by anyone passing by, and unlocking is usually a hotkey anyone could press rather than authentication.
What a real "screen on, input off" lock needs
- Authentication to unlock — Touch ID or your Mac password, not a hotkey or an on-screen button.
- App-level privacy — the terminal you want visible stays visible; everything else (mail, chats, browser tabs) gets hidden.
- Shortcut blocking — Spotlight can preview your files and Force Quit can kill the lock. Both need to be swallowed.
- A display that stays awake — the whole point is being able to glance at progress from across the room.
How VibeLock does it
VibeLock is a native menu bar app. One click locks the Mac: a system-wide event tap swallows every keystroke, click, scroll and shortcut; every app not on your allowlist is hidden behind an opaque backdrop; the display is held awake. Your terminal — or any app you choose — keeps streaming on screen. Touching the keyboard doesn't type anything; it raises a Touch ID prompt. Your login password works as the fallback, verified locally by macOS.
It also covers the edge cases the simple lockers miss: fullscreen apps on other Spaces get shielded, Dock clicks on hidden apps are re-hidden instantly, and ⌘Q is blocked so nobody can quit the processes you left running.
If your reason for locking input is an unattended Claude Code or Codex session, or you just want a proper keyboard cleaning mode that doubles as a lock, that's the exact scenario VibeLock was built for.