Everything you ever wanted to know about terminals
Here is something I learned only several weeks ago. While working on Pipe Watch, I strayed into reading the standard.<p>* The ESC [ command start sequence is actually a compromise for 7 bit systems. The [ character is not chosen by accident. It has an obvious positional relationship to ESC in the ASCII code which is why, informally, Ctrl-[ is the same as ESC.<p>* If you have an 8-bit-clean channel to the terminal, only a single character is required: the &quot;upper escape&quot; from the C1 control character set (0x80 to 0x9F).  This character, 128 + 27 or 0x9B is called CSI: control sequence introducer, which is basically its role in these terminal control sequences. Thus ESC [ is just an alternative way of encoding CSI for 7 bit. E.g instead of CSI 4 A, you use ESC [ 4 A.