enable_raw_mode! : () => Try({}, [TtyErr(IOErr)])
Enable terminal raw mode to disable some default terminal behaviour.
This leads to the following changes:
- Input will not be echoed to the terminal screen.
- Input will be sent straight to the program instead of being buffered (= collected) until the Enter key is pressed.
- Special keys like Backspace and CTRL+C will not be processed by the terminal driver but will be passed to the program.
Calling this when raw mode is already enabled does nothing and returns Ok.
Calls are not counted, so a single [Tty.disable_raw_mode!] undoes any number
of calls to this function.
Returns a TtyErr when the process has no terminal to configure (for
example when it runs detached from a terminal), or when the operating
system rejects the change. The terminal mode is left untouched in that case.