-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mouse drag doesn't work #102
Comments
I also encountered this problem in macOS Ventura 13.4 and rdev 0.5.3. Did you solve it? |
grabbing is |
Here is my try: fn main() {
if let Err(error) = listen(callback) {
println!("Error: {:?}", error)
}
fn callback(event: Event) {
println!("My callback {:?}", event);
match event.event_type {
EventType::ButtonPress(button) => match button {
Button::Right => {
println!("right btn press");
},
_ => (),
},
EventType::ButtonRelease(button) => match button {
Button::Right => {
println!("right btn release");
},
_ => (),
},
EventType::MouseMove { x, y } => {
println!("x: {}, y: {}", x, y);
},
_ => (),
}
}
} This is output when I press right button, then move the mouse, and finally release right button.
|
Did you find a solution to this? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
First of all, thank you for this library.
When I tried the example https://github.com/Narsil/rdev/blob/main/examples/grab.rs, it prints mouse move and click events. But, when I click and move the mouse while the mouse button is being clicked, it doesn't print those events. I expect MouseMove events to be printed between the ButtonPress(Left) and ButtonRelease(Left) events.
Here's the output:
Here's what I expect:
I'm using macOS Ventura 13.1 and rdev version 0.5.2.
The text was updated successfully, but these errors were encountered: