gleamtea/key
Keyboard events.
beamtea’s beamtea_key module decodes raw terminal bytes into these key
events. Each variant here maps to the exact Erlang term beamtea produces,
so a {key, Key} message from the runtime pattern-matches straight onto
gleamtea.Key(...) with one of the values below:
- named keys become atoms:
up↔Up,enter↔Enter, … {ctrl, $c}↔Ctrl(99){char, CodePoint}↔Char(99)— a full Unicode code point
Types
A decoded keypress.
pub type Key {
Up
Down
Left
Right
Home
End
PageUp
PageDown
Insert
Delete
Enter
Tab
BackTab
Backspace
Esc
Ctrl(Int)
Char(Int)
}
Constructors
-
Up -
Down -
Left -
Right -
Home -
End -
PageUp -
PageDown -
Insert -
Delete -
Enter -
Tab -
BackTab -
Backspace -
Esc -
Ctrl(Int)A Ctrl-combination, e.g. Ctrl-C is
Ctrl(99)(99 =c). -
Char(Int)A printable character as a Unicode code point, e.g.
Char(97)=a.