struct

TermBuf::Input::Events::Mouse

Inherits TermBuf::Input::Event < Struct < Value < Object

The pointer did something, out of an SGR mouse report.

x and y are 0-based buffer cells, converted from the 1-based coordinates the terminal sends, so they can be handed to a buffer's hit test as they stand.

These arrive only once the application has turned reporting on, which is CSI ? 1000 ; 1006 h at its shortest — whatever mode set the application wants, sent through whatever its driver offers.

Nothing enables it for the application, because a terminal reporting the mouse is one that no longer lets the person select text with it, and that is not a trade a library makes on someone's behalf. Whatever turned the mode on turns it off again on the way out.

A wheel notch is an Input::Mouse::Action::Press whose button answers Input::Mouse::Button#wheel?, and no release follows it.

Constructors

new(button : Input::Mouse::Button, x : Int32, y : Int32, modifiers : Modifiers, action : Input::Mouse::Action)
Source

Instance methods

action
button
clone
Source
copy_with(button _button = @button, x _x = @x, y _y = @y, modifiers _modifiers = @modifiers, action _action = @action)
Source
modifiers
x
y