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

Handle batched mouse events #212

Closed
wingdeans opened this issue Jan 31, 2022 · 0 comments · Fixed by #215
Closed

Handle batched mouse events #212

wingdeans opened this issue Jan 31, 2022 · 0 comments · Fixed by #215
Labels
bug Something isn't working

Comments

@wingdeans
Copy link

This snippet stops all events that are not 6 bytes long from being processed as mouse events.

However, some terminals may emit multiple mouse events per "tick."

  • alacritty emits two events when a mouse down and mouse move occur simultaneously, dropping the event
  • termux emits the mouse down and mouse up event simultaneously for mouse clicks (this stops all mouse clicks from registering)
    example of mouse click:
    (dlv) p string(buf)
    "\x1b[M +6\x1b[M#+6"
    

Reproducing

  • build the "mouse" example with optimizations off -gcflags "all=-N -l"
  • break on line 68 of mouse.go
  • trigger breakpoint by moving mouse and pressing mouse button simultaneously

Expected Behaviour

Should register "batched" mouse events, like ncurses-based apps.

muesli added a commit that referenced this issue Feb 3, 2022
Mouse events may trigger more than a single events simultaneously.

Fixes #212.
muesli added a commit that referenced this issue Feb 3, 2022
Mouse events may trigger more than a single events simultaneously.

Fixes #212.
muesli added a commit that referenced this issue Feb 3, 2022
Mouse events may trigger more than a single events simultaneously.

Fixes #212.
muesli added a commit that referenced this issue Feb 3, 2022
Mouse events may trigger more than a single events simultaneously.

Fixes #212.
muesli added a commit that referenced this issue Feb 13, 2022
Mouse events may trigger more than a single events simultaneously.

Fixes #212.
@muesli muesli added the bug Something isn't working label Feb 13, 2022
lorenzo-milicia pushed a commit to lorenzo-milicia/bubbles that referenced this issue Mar 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants