class
CryTUI::InputParser
- CryTUI::InputParser
- Reference
- Object
Overview
Incremental VT input parser for the keys used by obsctl. It accepts chunks because escape sequences and UTF-8 input may straddle reads.
Defined in:
crytui/input.crConstant Summary
-
PASTE_END =
"\e[201~" -
PASTE_START =
"\e[200~" -
SGR_MOUSE =
/\A\e\[<(\d+);(\d+);(\d+)([Mm])/ -
SGR mouse reports,
ESC [ < button ; column ; row (M|m), requested with DECSET 1006. Preferred over the original X10 encoding because its coordinates are decimal and so are not capped at column 223. -
X10_MOUSE_PREFIX =
"\e[M" -
The X10 encoding,
ESC [ Mthen three bytes biased by 32. Parsed only so a terminal that ignores the 1006 request cannot wedge the parser: without it these bytes fall through to the unknown-sequence branch, which does not match and so waits forever for a completion that never comes.
Constructors
Instance Method Summary
- #feed(chunk : String) : Array(InputEvent)
-
#flush_escape : Array(InputEvent)
Resolve a lone escape byte after the caller's escape-delay expires.
Constructor Detail
Instance Method Detail
def flush_escape : Array(InputEvent)
#
Resolve a lone escape byte after the caller's escape-delay expires.