]> git.proxmox.com Git - mirror_edk2.git/commit
Accept VT220 DEL and function keys for TTY terminal type
authorRoy Franz <roy.franz@linaro.org>
Thu, 9 Jul 2015 06:24:20 +0000 (06:24 +0000)
committerlersek <lersek@Edk2>
Thu, 9 Jul 2015 06:24:20 +0000 (06:24 +0000)
commit014f93acab63e8e72f2113d8090c550e05c16c93
tree9974ad173f034e003c6e26de0ffcbe3be3919610
parent34098df21247b3e7cf0268b06ff73ef68c828709
Accept VT220 DEL and function keys for TTY terminal type

Accept the VT220 escape code [3~ as backspace for TtyTerm terminals.  This is
sent by many Linux terminals by default.  Also accept VT220 function keys
F1-F12, and VT100 F1-F4 keys as these are commonly sent by Linux terminals.
The VT220 escape codes are longer, and variable length so a new state is added
to the state machine along with a variable to construct the multibyte escape
sequence.
There are currently no ambiguous escape sequence prefixes accepted, so the TTY
terminal accepts escape sequences for a variety of terminals.  The goal is to
'just work' with as many terminals as possible, rather than properly emulating
any specific terminal.  Backspace, Del, and F10 have been tested on xterm,
rxvt, tmux, and screen.
Note: The existing vt100 function key handling does not match the vt100
documentation that I found, so I added the TTY terminal handling
of VT100 F1-F4 (really PF1-PF4 on vt100) separately.  The vt100
has no F5-F10 keys, so I don't know what the current vt100 code
is based on.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Roy Franz <roy.franz@linaro.org>
Reviewed-by: Feng Tian <feng.tian@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17897 6f19259b-4bc3-4df7-8a09-765794883524
MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c
MdeModulePkg/Universal/Console/TerminalDxe/Terminal.h
MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c