HN user

wlswo

1 karma

backend developer

Posts2
Comments5
View on HN

Implementation Details: We currently use a hybrid polling approach rather than a pure event-driven one.

Mechanism: The Rust backend runs a high-priority background loop using AXUIElementCopyElementAtPosition to track the element under the cursor.

Optimization: To minimize overhead, the polling frequency is throttled and only ramps up when the overlay is active. We use CoreGraphics to first detect mouse movement delta before triggering the heavier Accessibility API calls.