readmouse

Crates.ioreadmouse
lib.rsreadmouse
version0.2.1
sourcesrc
created_at2019-12-28 13:48:28.372863
updated_at2019-12-29 16:40:47.220905
descriptionA very small library for reading the mouse location and mouse button presses on macOS.
homepagehttps://github.com/segeljakt/readmouse
repositoryhttps://github.com/segeljakt/readmouse
max_upload_size
id192947
size4,973
Klas Segeljakt (segeljakt)

documentation

README

readmouse

A very small library for reading the mouse location and mouse button presses on macOS.

Example usage

Continuously print the mouse location:

use readmouse::Mouse;

fn main() {
    loop {
        println!(
            "L={:?} R={:?} C={:?} (x,y)={:?}",
            Mouse::Left.is_pressed(),
            Mouse::Right.is_pressed(),
            Mouse::Center.is_pressed(),
            Mouse::location()
        );
    }
}

Related

readkey - Find out if a key on the keyboard is currently pressed on macOS.

Commit count: 3

cargo fmt