INNER CODE UNIT · Rust

setup_hotkeys

Blur009/Blur-AutoClicker · src-tauri/src/lib.rs:384

fn setup_hotkeys(app: &AppHandle) -> Result<(), std::io::Error> {
    let initial_hotkey = {
        let state = app.state::<ClickerState>();
        let hotkey = state
            .settings
            .lock()
            .unwrap_or_else(poisoned_inner)
            .hotkey
            .clone();
        hotkey
    };

    start_hotkey_listener(app.clone());
    register_hotkey_inner(app, initial_hotkey).map_err(std::io::Error::other)?;
    emit_status(app);
    Ok(())
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…