Keys I keep hitting should work like I expect them to.
Home or Ctrl+A = move to beginning of line
End or Ctrl+E = move to end of line
Del = delete-right
Ctrl+K = delete to end of line
Ctrl+L = clear screen and reprint current line
Ctrl+N = next command
Ctrl+P = previous command
Also, improve filtering of escape sequences and non-printable
characters, so hitting unsupported keys or control codes doesn't mess
up the current line of input.
BUG=chrome-os-partner:11666
TEST=manual
type 'fhelpbar'
home -> cursor moves to beginning of line
Ctrl+E -> cursor moves to end of line
Ctrl+A -> cursor moves to beginning of line
(of course, if you're using Minicom, you'll need to type Ctrl+A A, since
Minicom uses Ctrl+A as its control key)
del -> 'helpbar'
end -> cursor moves to end of line
left-arrow 3 times -> cursor moves under 'b'
Ctrl+L -> screen clears, cursor still under 'b'
Ctrl+K -> 'help'
Ctrl+Y Page-Up Page-Down -> nothing printed
enter -> prints known commands (output of 'help' command)
Ctrl+P -> 'help'
Ctrl+N -> empty command line
Change-Id: Id893c93b26db8f3deed6ea8be5aab88a3daaead4
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/28143