/** @file\r
Implementation for EFI_SIMPLE_TEXT_INPUT_PROTOCOL protocol.\r
\r
+(C) Copyright 2014 Hewlett-Packard Development Company, L.P.<BR>\r
Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
pressed.\r
\r
@retval TRUE Key be pressed matches a registered key.\r
- @retval FLASE Match failed.\r
+ @retval FALSE Match failed.\r
\r
**/\r
BOOLEAN\r
case PCANSITYPE:\r
case VT100TYPE:\r
case VT100PLUSTYPE:\r
+ case TTYTERMTYPE:\r
AnsiRawDataToUnicode (TerminalDevice);\r
UnicodeToEfiKey (TerminalDevice);\r
break;\r
@param Input The key will be input.\r
\r
@retval TRUE If insert successfully.\r
- @retval FLASE If Raw Data buffer is full before key insertion,\r
+ @retval FALSE If Raw Data buffer is full before key insertion,\r
and the key is lost.\r
\r
**/\r
@param Output The key will be removed.\r
\r
@retval TRUE If insert successfully.\r
- @retval FLASE If Raw Data FIFO buffer is empty before remove operation.\r
+ @retval FALSE If Raw Data FIFO buffer is empty before remove operation.\r
\r
**/\r
BOOLEAN\r
@param TerminalDevice Terminal driver private structure\r
\r
@retval TRUE If Raw Data FIFO buffer is empty.\r
- @retval FLASE If Raw Data FIFO buffer is not empty.\r
+ @retval FALSE If Raw Data FIFO buffer is not empty.\r
\r
**/\r
BOOLEAN\r
@param TerminalDevice Terminal driver private structure\r
\r
@retval TRUE If Raw Data FIFO buffer is full.\r
- @retval FLASE If Raw Data FIFO buffer is not full.\r
+ @retval FALSE If Raw Data FIFO buffer is not full.\r
\r
**/\r
BOOLEAN\r
@param Key The key will be input.\r
\r
@retval TRUE If insert successfully.\r
- @retval FLASE If FIFO buffer is full before key insertion,\r
+ @retval FALSE If FIFO buffer is full before key insertion,\r
and the key is lost.\r
\r
**/\r
@param Output The key will be removed.\r
\r
@retval TRUE If insert successfully.\r
- @retval FLASE If FIFO buffer is empty before remove operation.\r
+ @retval FALSE If FIFO buffer is empty before remove operation.\r
\r
**/\r
BOOLEAN\r
return FALSE;\r
}\r
\r
- *Output = TerminalDevice->EfiKeyFiFo->Data[Head];\r
+ CopyMem (Output, &TerminalDevice->EfiKeyFiFo->Data[Head], sizeof (EFI_INPUT_KEY));\r
\r
TerminalDevice->EfiKeyFiFo->Head = (UINT8) ((Head + 1) % (FIFO_MAX_NUMBER + 1));\r
\r
@param TerminalDevice Terminal driver private structure\r
\r
@retval TRUE If FIFO buffer is empty.\r
- @retval FLASE If FIFO buffer is not empty.\r
+ @retval FALSE If FIFO buffer is not empty.\r
\r
**/\r
BOOLEAN\r
@param TerminalDevice Terminal driver private structure\r
\r
@retval TRUE If FIFO buffer is full.\r
- @retval FLASE If FIFO buffer is not full.\r
+ @retval FALSE If FIFO buffer is not full.\r
\r
**/\r
BOOLEAN\r
@param Input The key will be input.\r
\r
@retval TRUE If insert successfully.\r
- @retval FLASE If Unicode FIFO buffer is full before key insertion,\r
+ @retval FALSE If Unicode FIFO buffer is full before key insertion,\r
and the key is lost.\r
\r
**/\r
@param TerminalDevice Terminal driver private structure\r
\r
@retval TRUE If Unicode FIFO buffer is empty.\r
- @retval FLASE If Unicode FIFO buffer is not empty.\r
+ @retval FALSE If Unicode FIFO buffer is not empty.\r
\r
**/\r
BOOLEAN\r
@param TerminalDevice Terminal driver private structure\r
\r
@retval TRUE If Unicode FIFO buffer is full.\r
- @retval FLASE If Unicode FIFO buffer is not full.\r
+ @retval FALSE If Unicode FIFO buffer is not full.\r
\r
**/\r
BOOLEAN\r
if (TerminalDevice->TerminalType == PCANSITYPE ||\r
TerminalDevice->TerminalType == VT100TYPE ||\r
TerminalDevice->TerminalType == VT100PLUSTYPE ||\r
- TerminalDevice->TerminalType == VTUTF8TYPE) {\r
+ TerminalDevice->TerminalType == VTUTF8TYPE ||\r
+ TerminalDevice->TerminalType == TTYTERMTYPE) {\r
switch (UnicodeChar) {\r
case 'A':\r
Key.ScanCode = SCAN_UP;\r
}\r
\r
if (UnicodeChar == DEL) {\r
- Key.ScanCode = SCAN_DELETE;\r
- Key.UnicodeChar = 0;\r
+ if (TerminalDevice->TerminalType == TTYTERMTYPE) {\r
+ Key.ScanCode = SCAN_NULL;\r
+ Key.UnicodeChar = CHAR_BACKSPACE;\r
+ }\r
+ else {\r
+ Key.ScanCode = SCAN_DELETE;\r
+ Key.UnicodeChar = 0;\r
+ }\r
} else {\r
Key.ScanCode = SCAN_NULL;\r
Key.UnicodeChar = UnicodeChar;\r