class

Term2::MouseReader

Inherits Reference < Object

MouseReader handles parsing mouse events from terminal input.

This class parses both SGR (modern) and legacy X10 mouse protocols. SGR format: \e[<code;x;y[Mm] Legacy format: \e[Mbxy

The reader maintains an internal buffer to handle partial sequences.

Instance methods

check_mouse_event(buffer : String) : MouseEvent | Nil

Check if the given buffer contains a complete mouse event

Source
read_mouse_event(io : IO) : MouseEvent | Nil
Source