Input emulation and global hooks for keyboard and mouse.
```rust use hookmapcore::{ButtonAction, EventBlock, Key, INPUTHANDLER};
fn main() { INPUTHANDLER .keyboard .lock() .unwrap() .registerhandler(|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();
} ```