OS-level mouse-event hook for OpenLogi.
| Platform | Implementation |
|---|---|
| macOS | CGEventTap (same primitive used by Logi Options+) |
| Linux | evdev grab + uinput re-injection |
| Windows | stub — returns [HookError::Unsupported] |
Usage
use openlogi_hook::{Hook, MouseEvent, EventDisposition};
if !Hook::has_accessibility() {
eprintln!("grant Accessibility access first");
return;
}
let hook = Hook::start(|event| {
println!("{event:?}");
EventDisposition::PassThrough
}).unwrap();
// … later, on shutdown:
hook.stop();