Expand description
Term is a thread-safe “terminal”.
It allows you to:
- Listen to key stroke events
- Output contents to the terminal
use tuikit::prelude::*;
let term = Term::<()>::new().unwrap();
while let Ok(ev) = term.poll_event() {
if let Event::Key(Key::Char('q')) = ev {
break;
}
term.print(0, 0, format!("got event: {:?}", ev).as_str());
term.present();
}
Term is modeled after termbox. The main idea is viewing terminals as a table of fixed-size cells and input being a stream of structured messages