TerminalMode
TerminalMode describes a configuration state of a terminal interface that governs how input and output are processed by a program interacting with a terminal. It is a conceptual setting used by many libraries and applications to control user input, editing, and display behavior, and is commonly exposed as an enumerated type or a set of flags in code.
Two widely discussed modes are canonical (also called cooked) mode and raw mode. In canonical mode, input
On POSIX systems, terminal behavior is manipulated via termios; a program retrieves current attributes with tcgetattr,
TerminalMode is central to interactive shells, read–eval–print loops, text editors that run in a terminal, and
When designing with TerminalMode, developers should consider portability, user experience, and security. Differences between platforms and