enableRawMode
Save the current terminal settings and enter "raw" mode.
Raw mode is described as "input is available character by character, echoing is disabled, and all special processing of terminal input and output characters is disabled."
The saved settings can be restored by calling close on the returned instance.
See termios(3)
for more information.
In addition to the flags required for entering "raw" mode, on POSIX-compliant platforms, this function will change the standard input stream to block indefinitely until a minimum of 1 byte is available to read. This allows the reader thread to fully be suspended rather than consuming CPU. Use create to read in a manner that can still be interrupted.