I've been trying to use rdev on a Mac, and I conducted tests using the code below. I found that under default circumstances on macOS, the code works properly. However, if the computer is being remotely accessed through Apple's built-in screen sharing software or similar remote software like todesk, event capturing fails.
use rdev::{listen, Event};
fn callback(event: Event) {
println!("My callback {:?}", event);
match event.name {
Some(string) => println!("User wrote {:?}", string),
None => (),
}
}
fn main() {
// This will block.
if let Err(error) = listen(callback) {
println!("Error: {:?}", error)
}
}
I've been trying to use rdev on a Mac, and I conducted tests using the code below. I found that under default circumstances on macOS, the code works properly. However, if the computer is being remotely accessed through Apple's built-in screen sharing software or similar remote software like todesk, event capturing fails.