struct

TUI::KeyEvent

Inherits Struct < Value < Object

A single parsed input event. char is only meaningful when key == Key::Char (the literal typed character); row/col are only set for Key::MouseClick (1-based terminal coordinates — see Keys.parse_sgr_mouse) and nil for every other kind, including the wheel events, which carry no position; text is only set for Key::Paste (the full pasted content between bracketed-paste markers — see Keys.parse_bracketed_paste), nil otherwise.

Constructors

new(key : Key, char : Char = '\0', row : Int32 | Nil = nil, col : Int32 | Nil = nil, text : String | Nil = nil)
Source

Instance methods

char
clone
Source
col
copy_with(key _key = @key, char _char = @char, row _row = @row, col _col = @col, text _text = @text)
Source
key
row
text