hookmap-core 0.1.0

Input emulation and global hooks for keyboard and mouse.
docs.rs failed to build hookmap-core-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: hookmap-core-0.2.1

hookmap-core

Input emulation and global hooks for keyboard and mouse.

Supported OS

  • Windows 10

Eample

use hookmap_core::{ButtonAction, EventBlock, Key, INPUT_HANDLER};

fn main() {
    INPUT_HANDLER
        .keyboard
        .lock()
        .unwrap()
        .register_handler(|e| {
            match e.target {
                Key::RightArrow => println!("Left"),
                Key::UpArrow => println!("Up"),
                Key::LeftArrow => println!("Left"),
                Key::DownArrow => println!("Down"),
                _ => println!("Other"),
            };

            match e.action {
                ButtonAction::Press => println!("Pressed"),
                ButtonAction::Release => println!("Released"),
            }

            EventBlock::Unblock
        });

    INPUT_HANDLER.handle_input();
}