disable_raw_mode

Function disable_raw_mode 

Source
pub fn disable_raw_mode()
Expand description

Disable raw mode

§Panics

Will panic if it fails to disable raw mode

§Raw Mode

By default, the terminal functions in a certain way. For example, it will move the cursor to the beginning of the next line when the input hits the end of a line. Or that the backspace is interpreted for character removal.

Sometimes these default modes are irrelevant, and in this case, we can turn them off. This is what happens when you enable raw modes.

Those modes will be set when enabling raw modes:

  • Input will not be forwarded to screen
  • Input will be processed immediately, without needing to press enter
  • Input will not be line buffered (input sent byte-by-byte to input buffer)
  • Special keys like backspace and CTRL+C will not be processed by terminal driver so you will have to implement triggers for them yourself
  • New line character will not automatically do a carriage return therefore regular println! can’t be used, use write!, the printlnr!() macro (included with this crate) or end your println!s with \r instead