Twiddles and fixes to ANSI and input

-- fixed arrow/etc keys not working right in input field
-- detected (but didn't do anything about, yet) login "connect asdf
asdf" in input field
-- implemented most of ANSI inverse but bg color isn't being detected
correctly yet.