This program puts your terminal in raw mode, eats keystrokes, and prints them back it you in a recognizable printed form. I will be useful if youre not certain what various keyboard keys are sending.
Non-printables (and whitespace) are displayed as cookies surrounded by < >. The cookie will always contain an ASCII mnemonic (NUL, SOH, STX, ETX, EOT, ENQ, ACK, BEL, BS, HT, LF, VT, FF, CR, SO, SI, DLE, DC1, DC2, DC3, DC4, NAK, SYN, ETB, CAN, EM, SUB, ESC, FS, GS, RS, US, SP) and may also contain a control-key formula.
Characters with the high bit set are shown as <ALT-xxx>, where xxx is generated as previously described. You terminate the program with your shell interrupt or quit characters.
Eric S. Raymond <email@example.com>