Catches people trying to use your computer while you're away. Grabs all input devices so nothing works, snaps a timestamped webcam photo when someone tries, and unlocks with a secret key.
Working on macOS and Linux.
The app needs Accessibility API access to grab input devices.
- Open System Settings > Privacy & Security > Accessibility
- Add your terminal app (e.g. Terminal.app, iTerm2, Alacritty) to the list
- Run with
cargo run
If input stops being blocked after a macOS update, remove the terminal from that list and add it back.
The app needs access to /dev/input/* devices to grab keyboards and mice.
- Add your user to the
inputgroup:sudo usermod -aG input $USER - Log out and back in for the group change to take effect
- Verify with
groups:inputshould be in the list - Run with
cargo run
- Run
cargo run, orcargo run -- --password <secret>(--pwfor short) to choose the secret - All keyboard and mouse input is grabbed and the desktop stops responding
- Any input triggers a timestamped webcam photo saved to
gotchas/ - Type the secret to release all devices and exit: test unless you passed
--password. Letters and digits only, and case does not matter, since a key press carries no Shift