A modern, premium macOS utility that locks your keyboard so you can safely clean it without triggering accidental keypresses, system shortcuts, or media actions. It features an interactive, glassmorphic real-time keyboard visualizer designed to match Apple's modern keyboard layout.
- 🔒 Full Keyboard Interception: Completely blocks standard keys, system shortcuts (like
Cmd+Tab,Space), and hardware keys (brightness, volume, playback, mission control) from reaching macOS. - ✨ Apple-Aesthetic Visualizer: A stunning, premium dark/glassmorphic keyboard layout that replicates standard MacBook/Apple keyboard designs.
- ⬜ Real-time Press Feedback: Keys light up in sleek white in real-time as you press them, letting you verify that keys are physically working while keeping them completely blocked.
- ⚡ Hardware Key Mapping: Custom mapping logic intercepts Apple Silicon hardware keycodes (
F1-F12,fn/Globekey, and special audio/brightness control signals). - 🛡️ Premium Security UI: A clean interface showing locked/unlocked states and a live counter of blocked keypresses.
- UI Framework: SwiftUI with glassmorphic visuals (
NSVisualEffectViewwrapper). - Key Interception: Low-level event tap (
CGEvent.tapCreate) for.cgSessionEventTapto intercept system-widekeyDown,keyUp,flagsChanged, andNX_SYSDEFINED(system control) events. - Sandbox Configuration: Sandbox is disabled (
ENABLE_APP_SANDBOX = NO) to permit low-level global system-wide key observation and Accessibility database access.
- macOS 14.0 or newer
- Xcode 15.0 or newer
- Open the project in Xcode:
open cleanyourmackeyboard.xcodeproj
- Press ▶ Run (or
Cmd + R) in Xcode to compile and build. - Click the "Grant System Access" button in the app UI to register with macOS Accessibility settings.
Because CleanMacKeyboard intercepts keystrokes globally, macOS requires Accessibility Access. If the permission prompt does not appear, or the app doesn't show up in your System Settings, follow these simple developer reset steps:
- Quit the application completely (Cmd + Q or stop the task in Xcode).
- Open your Terminal and reset the Privacy (TCC) database for the app:
tccutil reset Accessibility com.kaushal.cleanyourmackeyboard
- Re-run the app from Xcode.
- Click "Grant System Access" in the app. The native macOS permission popup will appear, and the app will automatically list itself under System Settings > Privacy & Security > Accessibility.
- Enable the toggle next to CleanMacKeyboard, and you are ready to go!
Privacy Policy :
https://docs.google.com/document/d/1LldiIxqF2GX2la6t7PhM9ZdJ7vGsaQlW_t2T9ajBXl4/edit?usp=sharing
You can distribute the application using two methods: automated releases via GitHub Actions or manual packaging using a local script.
This repository includes a pre-configured GitHub Actions workflow that compiles, packages, and releases the app automatically when you create a new version tag.
- Tag your release in git (e.g., version
v1.0.0):git tag v1.0.0
- Push the tag to GitHub:
git push origin v1.0.0
- GitHub Actions will trigger, compile the code on a macOS runner, package it into a
.zipand.dmg, and publish them under a new GitHub Release.
If you want to package the app locally without pushing a tag:
- Run the packaging script in the root directory:
./build_and_package.sh
- This script compiles the project in
Releaseconfiguration and outputs two distribution files:CleanMacKeyboard.zip(compressed archive containing the.app)CleanMacKeyboard.dmg(installable Apple disk image)
- You can manually create a release on GitHub and upload these two files as assets.
- Go to the Releases page of this GitHub repository.
- Download
CleanMacKeyboard.dmg(recommended) orCleanMacKeyboard.zip. - Open the downloaded file:
- For DMG: Double-click the
.dmgand drag theCleanYourMacKeyboardicon into your/Applicationsfolder. - For ZIP: Extract the file and move
CleanYourMacKeyboard.appto your/Applicationsfolder.
- For DMG: Double-click the
Because this application is not signed with a paid Apple Developer ID certificate, macOS will block it on first launch, displaying a warning that it is from an "unidentified developer".
To bypass this and run the app, choose one of the following methods:
- Open your
/Applicationsfolder. - Right-click (or Control-click) on
CleanYourMacKeyboard. - Select Open from the context menu.
- Click the Open button in the warning dialog to authorize it permanently.
Open Terminal and run the following command to remove the quarantine flag:
xattr -cr /Applications/CleanYourMacKeyboard.appOnce opened, don't forget to Grant System Access (Accessibility permissions) so the app can intercept keys globally and protect your keyboard during cleaning.
This project is open-source and available under the MIT License.