A lightweight macOS menu bar app to temporarily disable keyboard input.
「Key察」= Key + 警察 = キーボードの警察官
- Clean your keyboard without accidental input
- Prevent cats from typing
- Focus mode during presentations
- No external dependencies - just pure Swift
- Open source - you can verify it's not a keylogger
- 🔒 One-click keyboard lock/unlock from menu bar
- 🔓 Auto-unlock on wake from sleep
- 📢 Notification on state change
- 💾 Only ~29MB memory usage
- 📦 96KB app size
Download the latest release from Releases.
git clone https://github.com/Perriermax/KeyboardLocker.git
cd KeyboardLocker
./build.sh
cp -r Key察.app /Applications/On first launch, you'll need to grant Accessibility permission:
- Open System Settings
- Go to Privacy & Security → Accessibility
- Add and enable Key察
- Click the lock icon in the menu bar
- Select "Lock Keyboard" to disable input
- Click again and select "Unlock Keyboard" to re-enable
The keyboard automatically unlocks when waking from sleep.
- macOS 12.0 (Monterey) or later
- Accessibility permission
Key察 uses CGEvent.tapCreate to intercept keyboard events at the system level. When locked, all keyboard events are discarded before reaching any application.
This is the same API that accessibility tools and keyboard customization apps use. It requires explicit user permission for security reasons.
MIT License - see LICENSE
This app is provided "as is" without warranty of any kind. Use at your own risk. The author is not responsible for any damages caused by using this app.
hoichan