Global keyboard lock in your terminal with safe mouse-first unlock.
KeyVoid is a cross-platform CLI that intercepts keyboard input at the OS level and displays an interactive full-screen terminal UI. It is built for focus sessions, safe keyboard lock while away from desk, toddler/cat-proof moments, and lightweight prank demos.
- What You Get
- System Requirements
- Install
- First Run Checklist
- Usage
- Modes
- Safety and Unlock Paths
- Troubleshooting
- Developer Setup
- Project Structure
- Security Notes
- License
- Global keyboard suppression (not just app-local key capture)
- Mouse-first unlock control with visible UI feedback
- Emergency failsafe combo (
ESC + SPACE) andCtrl+Cfallback - Seven built-in visual modes (
clean,zen,arcade,hacker,cat,prank,toddler) - Works through npm (
npx, local install, or global install)
| Requirement | Minimum |
|---|---|
| Node.js | >= 18 |
| Terminal | Interactive TTY (not piped/non-interactive) |
| OS | macOS, Linux, or Windows |
Platform-specific notes:
| OS | Status | Required Setup |
|---|---|---|
| macOS | Supported | Accessibility permission for your terminal app |
| Linux | Supported | X11 session + xinput installed |
| Windows | Supported | PowerShell available (default on modern Windows) |
# run instantly (no install)
npx keyvoid
# OR install globally once
npm install -g keyvoid
keyvoid- Open
System Settings - Go to
Privacy & Security -> Accessibility - Add your terminal app (
Terminal,iTerm2, etc.) - Toggle permission to ON
Install xinput:
# Ubuntu / Debian
sudo apt install xinput
# Fedora
sudo dnf install xinput
# Arch
sudo pacman -S xorg-xinputNote: KeyVoid is intended for X11 environments. Wayland setups may not provide equivalent behavior.
No additional permission prompts are typically required.
# interactive mode picker
keyvoid
# direct mode launch
keyvoid --clean
keyvoid --zen
keyvoid --arcade
keyvoid --hacker
keyvoid --cat
keyvoid --prank
keyvoid --toddlerCLI utilities:
keyvoid --help
keyvoid --version| Flag | Theme | Description |
|---|---|---|
--clean |
Minimal UI | High-contrast dashboard with animated blocked-key counter |
--zen |
Calm focus | Breathing-style motion and low-stimulus visuals |
--arcade |
Retro 8-bit | Shooter-inspired animation reacting to key mashing |
--hacker |
Matrix style | Green terminal aesthetic with lock-screen vibes |
--cat |
ASCII cat defense | Reactive cat states and streak-based animation |
--prank |
Fake updater | Convincing fake update view with secret unlock gesture |
--toddler |
Color chaos | Giant emoji bursts and fast-changing vibrant colors |
KeyVoid is intentionally designed with redundant exits:
- Click the on-screen UNVOID button using your mouse
- Hold
ESC + SPACEfor about 5 seconds (failsafe) - Use
Ctrl+Cas emergency terminal fallback
On exit, KeyVoid attempts to restore keyboard hook state before terminating.
- Re-check Accessibility permission for your exact terminal app
- Fully close and re-open terminal after granting permission
- Run
keyvoidagain
- Confirm you are in an X11 session
- Confirm
xinputexists:xinput --version - Retry from a local terminal session (not remote shell)
- Ensure you are on the latest commit/release
- Verify command spelling:
keyvoid --cat - Check version:
keyvoid --version
- If installed globally, check npm global bin is on
PATH - Or run via
npx keyvoid
git clone https://github.com/chirayuoli/keyvoid.git
cd keyvoid
npm install
npm run verifyUseful scripts:
npm run smoke-> checks CLI help/versionnpm run pack:preview-> previews publish tarball contentsnpm run verify-> runs smoke + pack preview
keyvoid/
├── bin/keyvoid.js # CLI entry point
├── src/app.js # Application orchestrator
├── src/engine/permissions.js # OS/platform checks
├── src/engine/suppressor/ # Native keyboard suppression layer
├── src/ui/renderer.js # Full-screen ANSI renderer
├── src/ui/mouse.js # Mouse region tracking and clicks
├── src/ui/skins/ # Visual modes
├── src/scripts/postinstall.js # macOS helper dependency bootstrap
├── CONTRIBUTING.md
├── CHANGELOG.md
└── LICENSE
Please see CONTRIBUTING.md for workflow and PR expectations.
KeyVoid intercepts keyboard input by design. Use only on systems and sessions you control. Avoid running in privileged production shells or remote sessions where recovery may be difficult.
MIT - see LICENSE.