xieite::term::read_key()

Defined in header <xieite/io/term.hpp>

Reads a key press from the input stream. If a key is not recognized, attempts to put characters back into the input stream using std::ungetc().


Declaration

[[nodiscard]] xieite::keys read_key() noexcept;


Example

int main() {
	xieite::term term;
	xieite::keys key = term.read_key();
	std::println("{}", xieite::keys_ch(key));
}
Possible output:
h