inputbot 0.2.0

A library for creating global hotkeys, as well as emulating mouse and keyboard input.
docs.rs failed to build inputbot-0.2.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: inputbot-0.6.0

InputBot docs link crates.io version

A very small AutoHotkey inspired library for creating global hotkeys, as well as emulating mouse and keyboard input.

How-To

Hotkeys can be created by matching input within a capture loop.

The code below demonstrates how to create a rapidfire hotkey for videogames.

extern crate inputbot;

use inputbot::*;
use Hotkey::*;
use KeybdHotkeyType::*;
use MouseHotkeyType::*;
use std::time::Duration;
use std::thread::sleep;

fn main() {
    register(MouseHotkey(PressRight), || {
        while get_logical_state(vk::RBUTTON) {
            mouse_press_left();
            sleep(Duration::from_millis(50));
            mouse_release_left();
        }
    });
    capture_input();
}

Check out the examples for more code samples, or read the documentation.