minicrossterm/crossterm_screen/examples/raw_mode.rs
Timon ad74f6b524
Introduced: Crossterm Workspace and feature flags. (#84)
* Introduced: crossterm workspace, feature flags.
2019-01-27 21:16:14 +01:00

17 lines
503 B
Rust

extern crate crossterm_screen;
use crossterm_screen::Screen;
use std::io::{stdout, Write};
use std::{thread, time};
pub fn raw_modes() {
// create a Screen instance who operates on the default output; io::stdout().
let screen = Screen::default();
// create a Screen instance who operates on the default output; io::stdout(). By passing in 'true' we make this screen 'raw'
let screen = Screen::new(true);
drop(screen); // <-- by dropping the screen raw modes will be disabled.
}