Registry / utility / rdev
library0.5.3rscratesunverified

Listens and sends keyboard and mouse events on Windows, Linux, and macOS.

# Cargo.toml [dependencies] rdev = "0.5.3"
INSTALL
IMPORT
SIG · RDEV
R
rdev
utilityrustv0.5.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

listen
use rdev::listen;

Listen to global keyboard and mouse events and print them.

use rdev::listen; fn main() { if let Err(error) = listen(|event| { println!("Event: {:?}", event); }) { println!("Error: {:?}", error); } }
Debug
Known issues
gotchaOn Linux, rdev requires root privileges or appropriate permissions to capture global input events.
fix
Run the application with sudo or configure udev rules for input devices.
affects: *
gotchaThe listen function blocks the main thread; use a separate thread or async runtime if you need concurrent operations.
fix
Wrap listen in std::thread::spawn or use an async executor.
affects: *
Upgrade
Version history
0.5.3latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
3 hits · last 30 days
node
2
Amazon
1
Resources
rdev — cargo add rdev · libregistry