How do you read the arrow keys?
问题 Extensive searching on the use of raw mode with termios and xterm leads to numerous references to a "timing trick" required to distinguish between an escape-sequence and a lone appearance of the escape character. So how do you do it? I don't want to use curses because I don't want to clear the screen. This is for a calculator-style program, so it's important to retain the "ticker-tape" interface. 回答1: finally found a nice detailed description in an old usenet thread. I quote the relevant