2019-01-28 07:16:14 +11:00
|
|
|
extern crate crossterm_screen;
|
|
|
|
|
2019-04-11 07:46:30 +10:00
|
|
|
use crossterm_screen::{IntoRawMode, RawScreen};
|
2019-01-28 07:16:14 +11:00
|
|
|
|
|
|
|
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(). By passing in 'true' we make this screen 'raw'
|
2019-04-11 07:46:30 +10:00
|
|
|
let screen = RawScreen::into_raw_mode();
|
|
|
|
let screen = stdout().into_raw_mode();
|
2019-01-28 07:16:14 +11:00
|
|
|
|
2019-04-11 07:46:30 +10:00
|
|
|
// raw screen will be disabled when it goes out of scope.
|
2019-01-28 07:16:14 +11:00
|
|
|
}
|