summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg
diff options
context:
space:
mode:
authorPhil Noh <Phil.Noh@amd.com>2024-09-13 15:43:57 -0500
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2024-09-18 03:42:47 +0000
commit21e8a85653e104385bfb8218fe22a72053bd3d2d (patch)
tree91e12966d00882326b52f63e42f206b3e506c747 /MdeModulePkg
parent170fa8ecd4bc5acb704400c5610365acff6a78e8 (diff)
downloadedk2-21e8a85653e104385bfb8218fe22a72053bd3d2d.tar.gz
edk2-21e8a85653e104385bfb8218fe22a72053bd3d2d.tar.bz2
edk2-21e8a85653e104385bfb8218fe22a72053bd3d2d.zip
MdeModulePkg/TerminalDxe: Add VTUTF8 to Putty function key map
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4848 This patch is to support VTUTF8 type for Putty function key map. In Putty, it is required for translating a stream of Unicode characters for function keys on UTF8 correctly. Signed-off-by: Phil Noh <Phil.Noh@amd.com>
Diffstat (limited to 'MdeModulePkg')
-rw-r--r--MdeModulePkg/Universal/Console/TerminalDxe/Terminal.h4
-rw-r--r--MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c11
2 files changed, 9 insertions, 6 deletions
diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.h b/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.h
index 7581cda18b..61fbd808ae 100644
--- a/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.h
+++ b/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.h
@@ -1216,8 +1216,8 @@ AnsiRawDataToUnicode (
Putty function key map:
+=========+======+===========+=============+=============+=============+=========+
| | EFI | | | | | |
- | | Scan | | | Normal | | |
- | KEY | Code | VT100+ | Xterm R6 | VT400 | Linux | SCO |
+ | | Scan | VT100+ | | Normal | | |
+ | KEY | Code | VTUTF8 | Xterm R6 | VT400 | Linux | SCO |
+=========+======+===========+=============+=============+=============+=========+
| F1 | 0x0B | ESC O P | ESC O P | ESC [ 1 1 ~ | ESC [ [ A | ESC [ M |
| F2 | 0x0C | ESC O Q | ESC O Q | ESC [ 1 2 ~ | ESC [ [ B | ESC [ N |
diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c
index fa1038ed43..dd31347402 100644
--- a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c
+++ b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c
@@ -1317,8 +1317,8 @@ UnicodeToEfiKeyFlushState (
Putty function key map:
+=========+======+===========+=============+=============+=============+=========+
| | EFI | | | | | |
- | | Scan | | | Normal | | |
- | KEY | Code | VT100+ | Xterm R6 | VT400 | Linux | SCO |
+ | | Scan | VT100+ | | Normal | | |
+ | KEY | Code | VTUTF8 | Xterm R6 | VT400 | Linux | SCO |
+=========+======+===========+=============+=============+=============+=========+
| F1 | 0x0B | ESC O P | ESC O P | ESC [ 1 1 ~ | ESC [ [ A | ESC [ M |
| F2 | 0x0C | ESC O Q | ESC O Q | ESC [ 1 2 ~ | ESC [ [ B | ESC [ N |
@@ -1395,7 +1395,8 @@ UnicodeToEfiKey (
if ((UnicodeChar == 'O') && ((TerminalDevice->TerminalType == TerminalTypeVt100) ||
(TerminalDevice->TerminalType == TerminalTypeTtyTerm) ||
(TerminalDevice->TerminalType == TerminalTypeXtermR6) ||
- (TerminalDevice->TerminalType == TerminalTypeVt100Plus)))
+ (TerminalDevice->TerminalType == TerminalTypeVt100Plus) ||
+ (TerminalDevice->TerminalType == TerminalTypeVtUtf8)))
{
TerminalDevice->InputState |= INPUT_STATE_O;
TerminalDevice->ResetState = RESET_STATE_DEFAULT;
@@ -1569,7 +1570,9 @@ UnicodeToEfiKey (
Key.ScanCode = SCAN_END;
break;
}
- } else if (TerminalDevice->TerminalType == TerminalTypeVt100Plus) {
+ } else if ((TerminalDevice->TerminalType == TerminalTypeVt100Plus) ||
+ (TerminalDevice->TerminalType == TerminalTypeVtUtf8))
+ {
switch (UnicodeChar) {
case 'P':
Key.ScanCode = SCAN_F1;