Reorganise doCommand() and friends a bit.
Split out the line updating to it's own function.
More escape sequence docs and clean ups.
Dump the key buffer on EOF.
Add bogus MC key, coz tmux is screwing with things.
Add a CSI parser.  We need one for terminal sizing and mouse reports.