|
CPGen
C++ project generator
|
Core type definitions shared across all TUI components. More...
Typedefs | |
| using | Key = std::variant< char, Special > |
| A single keypress from stdin, represented as either a printable character or a Special control key. | |
Enumerations | |
| enum class | Special : std::uint8_t { Enter , Up , Down , Left , Right , Escape , Backspace , Tab } |
| Non-printable / control keys recognised by the input reader. More... | |
Core type definitions shared across all TUI components.
A single keypress from stdin, represented as either a printable character or a Special control key.
Components receive a Key value from Utils::readKey() and pattern-match it with std::holds_alternative / std::get to implement their input logic.
|
strong |
Non-printable / control keys recognised by the input reader.
The underlying type is std::uint8_t to keep the enum as compact as possible (see the performance-enum-size guideline).