Skip to content
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 down event isn't registered when it happened shortly after another click (double click) #875

Open
Rumi152 opened this issue Apr 4, 2024 · 0 comments

Comments

@Rumi152
Copy link

Rumi152 commented Apr 4, 2024

Describe the bug
If i double click with a mouse (around half a second space between clicks) only the first click registers as event

To Reproduce
1.) Build and run code below

fn main() {
    crossterm::execute!(std::io::stdout(), crossterm::event::EnableMouseCapture,).unwrap();

    loop {
        match crossterm::event::read().unwrap() {
            crossterm::event::Event::Mouse(mouse) => {
                if let crossterm::event::MouseEventKind::Down(_) = mouse.kind {
                    println!("Mouse button down")
                }
            }
            _ => {}
        }
    }
}

2.) Double click with any mouse (or touchpad) button fast
3.) "Mouse button down" is printed only once (first click of a double click)

Expected behavior
Text should be printed twice, for every click

OS
Windows 11

Terminal/Console
Windows Command Prompt and VSCode terminal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant