Comment

Comment by wlswo

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.

parent wlswo 9 months ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton