inputkit 0.1.0

Keyboard and mouse input automation for Windows
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use inputkit::{MouseButton, mouse};
use std::thread::sleep;

fn main() {
    mouse::move_to(500, 300);
    mouse::click(MouseButton::Left);

    loop {
        mouse::move_to(500, 300);
        // IMPORTANT:
        // Always add a delay when repeatedly sending mouse or keyboard input.
        // A tight loop can send millions of input events, consume a CPU core,
        // and make your system difficult to control.
        sleep(std::time::Duration::from_millis(1000));
    }
}