Quote:
Originally Posted by daYz
Is '\n' the only character that gets entered when pressing the enter key? I always thought it where both '\r' and '\n'.
|
The Enter key always send a single CR '\r'. If you are in cooked mode, this '\r' is replaced by the driver to a LF '\n' a.k.a newline.
When outputting characters in cooked mode, '\n' is replaced by CR+LF '\r\n'.
When you are in raw mode, characters are left unchanged.