Termisu::Event::Mouse
Inherits Struct / Value / Object
Mouse input event.
Contains mouse position, button state, and modifiers. Supports all mouse protocols (X10, Normal, SGR, URXVT).
Example:
event = termisu.poll_event
if event.is_a?(Termisu::Event::Mouse)
case event.button
when .left?
puts "Left click at #{event.x},#{event.y}"
when .wheel_up?
puts "Scroll up"
when .release?
puts "Button released"
end
end
Constructors
new(x : Int32, y : Int32, button : Button, modifiers : Input::Modifier = Input::Modifier::None, motion : Bool = false)
Source