A minimal library to listen for global mousemove events. Supports Linux (X11), macOS, and Windows.
Add the following to your Cargo.toml:
[dependencies]
global-mousemove = "0.1.1"Listen for global mousemove events and print out the coordinates:
let _ = global_mousemove::listen(|event| {
println!("Mouse: ({}, {})", event.x, event.y,);
});See more information in the documentation. See more examples in the examples/ directory.
Feel free to open issues to report bugs or request features and improvements. Pull requests are also welcome, though for larger changes it would be generally better to open an issue for discussion first.
Copyright (c) 2025 The Deskulpt Development Team; this project is released under the MIT License.
This library is inspired by rdev. Please check it out if you need to listen fr other types of global input events, simulate input events, or need more advanced features.