2018-08-12 22:51:08 +10:00
|
|
|
//! This bin folder can be used to try the examples out located in the examples directory.
|
|
|
|
//!
|
|
|
|
//! All you need to do is:
|
|
|
|
//!
|
|
|
|
//! - Download the crossterm source code.
|
|
|
|
//! - Run program with: `cargo run --example examples`
|
|
|
|
|
|
|
|
extern crate crossterm;
|
|
|
|
|
|
|
|
// modules that could be test
|
2018-08-15 05:40:07 +10:00
|
|
|
mod color;
|
|
|
|
mod cursor;
|
|
|
|
mod input;
|
2018-11-22 03:48:22 +11:00
|
|
|
mod some_types;
|
|
|
|
mod terminal;
|
2018-08-12 22:51:08 +10:00
|
|
|
|
2018-11-22 08:57:39 +11:00
|
|
|
use crossterm::input::{TerminalInput, KeyEvent};
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
println!("Press 'x' to quit...");
|
|
|
|
TerminalInput::wait_until(KeyEvent::OnKeyPress(b'x'));
|
|
|
|
}
|