Clean your keyboard without typing gibberish
KeyClean locks your Mac's keyboard while you wipe it down. To unlock, hold a button with the trackpad.
Free · Version 1.0 · 2.7 MBApple silicon · macOS 26Tested on macOS 26.5.1
Install from TerminalLock it, then try to type.
This is the lock screen from the app. Press any key. It lights up and that's all.
The demo needs a physical keyboard. Open this page on your Mac to try it.
KeyClean
Ready
To unlock it, hold the button with the trackpad.
KEYCLEAN
Keyboard locked
Go ahead and clean. The keys do nothing.
Hold for a second and a half. From the keyboard, hold Space on this button.
The Touch ID button stays active. Go gently with the cloth there.
The demo only stops keys inside this page. Shortcuts like Command-W still reach your browser. The app stops those too.
Lock, clean, hold.
Lock
Click the KeyClean icon in the menu bar, then Blocca tastiera (lock keyboard). The screen turns white, so you can see the dust.
Clean
No key responds. That includes Command, Option and the other modifiers, and the brightness and volume keys.
Hold
Hold the button on screen for a second and a half, with the trackpad or a mouse. If the cloth brushes the trackpad, the lock stays on.
Three steps. Two are macOS asking.
KeyClean isn't signed with an Apple Developer ID, so macOS stops it the first time you open it. Then it needs your permission before it can block a key.
Drag to Applications
Open the disk image and drag KeyClean into the Applications folder.
Open Anyway
Open KeyClean. macOS blocks it. Go to System Settings > Privacy & Security, click Open Anyway at the bottom, then confirm with Open. You do this once.
Turn on Accessibility
Click the KeyClean icon in the menu bar, then Apri Impostazioni (open Settings). In Privacy & Security > Accessibility, switch KeyClean on. Back in the panel, the lock button is ready.
Or install from Terminal
The script downloads KeyClean, checks its SHA256, copies it to Applications and opens it. macOS doesn't block files downloaded from Terminal, so you skip step 2. You still turn on Accessibility by hand.
curl -fsSL https://github.com/alessiocardelli/keyclean/releases/latest/download/install.sh | bashIt drops your keys. It doesn't read them.
To stop a keypress before it reaches your apps, macOS requires the Accessibility permission. It's a broad one, and an app that holds it could see what you type. KeyClean uses it while the lock is on, to throw the keypresses away. It keeps no record of them. The app has no network code and collects no data. The lock lasts only as long as the app is running, so if KeyClean quits for any reason your keyboard works again.
Read the code on GitHubMIT licence
Questions
KeyClean isn't signed with an Apple Developer ID, which requires a paid Apple developer account. Gatekeeper stops apps without one the first time they open. You allow it once from System Settings > Privacy & Security > Open Anyway.
You can check for yourself. The code is on GitHub under the MIT licence, and it's short. The app never connects to the internet and installs nothing in the background.
It's the only way macOS lets an app stop a keypress. Without it, KeyClean shows no lock button. You can switch the permission off whenever you like, in System Settings > Privacy & Security > Accessibility.
Keep the button pressed for the full second and a half. A normal click is ignored on purpose. A mouse works as well as the trackpad. If nothing responds, hold the power button until the Mac turns off, knowing you lose unsaved work. When it starts again the keyboard is free, because KeyClean never locks by itself.
It stays active. KeyClean can't lock it, and the lock screen reminds you every time. Go gently with the cloth there.
No. The trackpad and mouse stay on, since you need one of them to unlock. While the lock is on, the white screen covers your windows, and a click on it does nothing.
It needs a Mac with Apple silicon and macOS 26. It has been tested on macOS 26.5.1. Intel Macs aren't supported. For now the app's own buttons are in Italian. The main one, Blocca tastiera, means lock keyboard.
Quit KeyClean from its panel and move it to the Bin. Then open System Settings > Privacy & Security > Accessibility, select KeyClean in the list and remove it with the minus button.