Personal project / Desktop utility
Cat Keyboard
The problem is small and familiar: a cat walks over a keyboard while another application has focus. I built a native Windows utility that can suppress keyboard input while keeping the mouse available to unlock it.
Windows utility · private source
Make unlocking dependable
Manual protection has a five-minute timeout. The dashboard, system tray, and Ctrl+Alt+F12 all provide ways out. Closing the app releases the hook. The guard tracks suppressed keys so key-up handling does not leave ordinary modifiers stuck.
Use a bounded detection rule
Automatic mode watches for four distinct non-modifier keys held within 120 milliseconds and applies a short lock. Repeated keys and ordinary modifier shortcuts are excluded. This is a key-cluster heuristic: it does not recognize cats, and the first keys may already have reached the focused app.
Separate the guard from Windows input
A small state machine owns held keys, suppressed keys, lock timeouts, and the unlock combination. A separate low-level Windows hook connects it to the desktop. Focused checks exercise that state without requiring live keyboard interception.
An earlier browser experiment
I also explored local cat detection with TensorFlow.js and a camera. That prototype can block input only inside its own page. The Windows utility addresses the separate problem of protecting ordinary desktop applications.