detectlib 0.1.3

A small rust library for input detection
Documentation

DetectLib

DetectLib is a rust library for x11 input with the keyboard and mouse. It will only work on x11 but wayland version is coming soon

Features

Keyboard

The keyboard part is pretty easy to use and has similar syntax to unity's input

Example:

use detectlib::*;

fn main() {
    loop {
        if getkey(KeyCode::ControlR) {
            println!("Control is being pressed");
        }
    }
}

Mouse

The mouse part is also similar to unity but uses a enum called MouseButton for buttons

Example:

use detectlib::*;

fn main() {
    loop {
        if getmousebutton(MouseButton::Left) {
            println!("CLICK AT ({}, {})", getmousepos().0, getmousepos().1);
        }
    }
}