mouseInput method
bool
mouseInput(
- TerminalMouseButton button,
- TerminalMouseButtonState buttonState,
- CellOffset position
Handle a mouse event and return true if it was handled.
position is a buffer position (row 0 is the oldest scrollback
line), passed to mouseHandler unchanged, as in xterm.
Implementation
bool mouseInput(
TerminalMouseButton button,
TerminalMouseButtonState buttonState,
CellOffset position,
) {
final output = mouseHandler?.call(
TerminalMouseEvent(
button: button,
buttonState: buttonState,
position: position,
state: this,
platform: platform,
),
);
if (output != null) {
_emit(output);
return true;
}
return false;
}