yigid 7224d7604e Detect a dead scroll tap from a background watchdog
The revocation guard never fired: scroll events stalled about 10 s and
mxd kept running without logging. Either AXIsProcessTrusted stayed true
in the running process or the main thread was stuck.

Check every 500 ms from a background queue, so a stuck main thread
can't stop the check. Also watch the outcome instead of trusting the
permission API alone: the HID scroll counter advancing without events
reaching the tap for 2 s, the tap staying disabled for 2 s, and two
timeouts within 30 s. Log which signal fired.

A hard _exit deadline is set first, in case removing the tap blocks.
Revocation exits 0 so launchd stays down. A stall exits 1, so a false
positive costs only a restart, and a real revocation leaves mxd idle
because tapCreate fails.

Assisted-by: Claude Sonnet 5.5
Signed-off-by: Yigit BALABAN <balaban@yigid.dev>
7224d7604e · 2026-10-30 23:45:08 +03:00
7 Commits
S
Description
scroll smoothing and gestures for MX Master 3S on macOS
900 KiB
0 Stars 1 Watchers 0 Forks
Languages
Swift 93.5%
Makefile 6.5%