diff options
author | Roy Franz <roy.franz@linaro.org> | 2015-07-09 06:24:15 +0000 |
---|---|---|
committer | lersek <lersek@Edk2> | 2015-07-09 06:24:15 +0000 |
commit | 34098df21247b3e7cf0268b06ff73ef68c828709 (patch) | |
tree | d451c0dd98f2bf65994c46377fdfb178cc476988 /MdeModulePkg/Universal/Console/TerminalDxe | |
parent | 6e3227c88c0a53df0a963628b1110f7d39e89883 (diff) | |
download | edk2-platforms-34098df21247b3e7cf0268b06ff73ef68c828709.tar.xz |
Treat ASCII 0x7F as backspace for TtyTerm terminals
Treat ASCII 0x7F as backspace, rather than delete, for TTY terminals. This
better matches the default Linux terminal settings that are used when connecting
to a simulated platform using xterm or a similar terminal program.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Roy Franz <roy.franz@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Feng Tian <feng.tian@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17896 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/Console/TerminalDxe')
-rw-r--r-- | MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c index 17a1244349..227df85f69 100644 --- a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c +++ b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c @@ -1561,8 +1561,14 @@ UnicodeToEfiKey ( }
if (UnicodeChar == DEL) {
- Key.ScanCode = SCAN_DELETE;
- Key.UnicodeChar = 0;
+ if (TerminalDevice->TerminalType == TTYTERMTYPE) {
+ Key.ScanCode = SCAN_NULL;
+ Key.UnicodeChar = CHAR_BACKSPACE;
+ }
+ else {
+ Key.ScanCode = SCAN_DELETE;
+ Key.UnicodeChar = 0;
+ }
} else {
Key.ScanCode = SCAN_NULL;
Key.UnicodeChar = UnicodeChar;
|