class RatatuiRuby::Event::Mouse

Reports a mouse interaction.

Modern terminals support rich pointer input, but the protocols are complex and varied. Handling clicks, drags, and scrolls requires robust parsing.

This event simplifies the complexity. It tells you exactly what happened (kind), where it happened (x, y), and which button was involved.

Use this to build interactive UIs. Implement click handlers, draggable sliders, or scrollable viewports with confidence.

Example

if event.mouse? && event.down? && event.button == "left"
  puts "Left click at #{event.x}, #{event.y}"
end