InputBot

A very small AutoHotkey inspired library for creating global hotkeys, as well as emulating mouse and keyboard input. Works on Windows and X11 Linux. Unlike AutoHotkey, can handle multiple hotkeys concurrently in one process.
How-To
The code below demonstrates how to create some simple hotkeys.
extern crate inputbot;
use inputbot::*;
use KeybdKey::*;
use MouseButton::*;
use std::time::Duration;
use std::thread::sleep;
fn main() {
NumLockKey.bind(|| {
while NumLockKey.is_toggled() {
LShiftKey.press();
WKey.press();
sleep(Duration::from_millis(50));
WKey.release();
LShiftKey.release();
}
});
RightButton.bind(|| {
while RightButton.is_pressed() {
LeftButton.press();
sleep(Duration::from_millis(50));
LeftButton.release();
}
});
QKey.bind(|| MouseCursor.move_rel(10, 10));
handle_input_events();
}