win-hotkeys 0.1.0

A simple thread safe rust library for system-wide hotkey management on Windows
docs.rs failed to build win-hotkeys-0.1.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: win-hotkeys-0.5.1

Win Hotkeys

Crates.io License Documentation

A lightweight, thread-safe Rust library for managing system-wide hotkeys on Windows

The win-hotkeys crate simplifies working with the Windows API by abstracting and managing all interactions related to registering hotkeys and handling their events. It provides a thread-safe access and a user- friendly interface for managing global hotkeys.

[dependencies]

win-hotkeys = "0.1.0"

How to use

use win_hotkeys::keys::{ModKey, VKey};
use win_hotkeys::HotkeyManager;

fn main() {
    let mut manager = HotkeyManager::new();

    manager.register_hotkey(VKey::A, &[ModKey::Ctrl], || {
        println!("Hotkey CTRL + A was pressed");
    }).unwrap();

    hkm.event_loop();
}

Examples

Up-to-date examples can always be found here