summaryrefslogtreecommitdiff
path: root/MdeModulePkg
diff options
context:
space:
mode:
authorRoy Franz <roy.franz@linaro.org>2015-07-09 06:24:15 +0000
committerlersek <lersek@Edk2>2015-07-09 06:24:15 +0000
commit34098df21247b3e7cf0268b06ff73ef68c828709 (patch)
treed451c0dd98f2bf65994c46377fdfb178cc476988 /MdeModulePkg
parent6e3227c88c0a53df0a963628b1110f7d39e89883 (diff)
downloadedk2-34098df21247b3e7cf0268b06ff73ef68c828709.zip
edk2-34098df21247b3e7cf0268b06ff73ef68c828709.tar.gz
edk2-34098df21247b3e7cf0268b06ff73ef68c828709.tar.bz2
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')
-rw-r--r--MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c
index 17a1244..227df85 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;