3 unstable releases
0.2.1 | Dec 29, 2019 |
---|---|
0.2.0 | Dec 28, 2019 |
0.1.6 | Dec 28, 2019 |
#105 in macOS and iOS APIs
3,501 downloads per month
Used in 33 crates
(2 directly)
4KB
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.