struct

Termbox::Event::KeyEvent

Inherits Termbox::Event::BaseEvent / Struct / Value / Object

Emitted by those key press events that are not representable by a printable(-ish) Char and a modifier.

Constructors

new(key : Termbox::Key | Nil, char : Char | Nil, mod : Termbox::KeyModifier)
Source

Class methods

from(event)

Creates a KeyEvent from a Termbox event struct.

Source

Instance methods

char

Returns the char that was pressed. Either this or key is available for key events.

Source
key

Returns the key that was pressed. Either this or char is available for key events.

Source
mod

Returns the key modifier.

Source