apply for doxgen format.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5038 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
vanjeff
2008-04-10 08:49:28 +00:00
parent ed7752ec44
commit fb0b259e4e
38 changed files with 1766 additions and 2402 deletions

View File

@@ -1,14 +1,14 @@
/**@file
Implementation for EFI_SIMPLE_TEXT_INPUT_PROTOCOL protocol.
Copyright (c) 2006 - 2007 Intel Corporation. <BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Copyright (c) 2006 - 2007, Intel Corporation. <BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
@@ -24,20 +24,20 @@ ReadKeyStrokeWorker (
/*++
Routine Description:
Reads the next keystroke from the input device. The WaitForKey Event can
Reads the next keystroke from the input device. The WaitForKey Event can
be used to test for existance of a keystroke via WaitForEvent () call.
Arguments:
TerminalDevice - Terminal driver private structure
KeyData - A pointer to a buffer that is filled in with the keystroke
KeyData - A pointer to a buffer that is filled in with the keystroke
state data for the key that was pressed.
Returns:
EFI_SUCCESS - The keystroke information was returned.
EFI_NOT_READY - There was no keystroke data availiable.
EFI_DEVICE_ERROR - The keystroke information was not returned due to
EFI_DEVICE_ERROR - The keystroke information was not returned due to
hardware errors.
EFI_INVALID_PARAMETER - KeyData is NULL.
EFI_INVALID_PARAMETER - KeyData is NULL.
--*/
{
@@ -47,7 +47,7 @@ ReadKeyStrokeWorker (
if (KeyData == NULL) {
return EFI_INVALID_PARAMETER;
}
}
//
// Initialize *Key to nonsense value.
@@ -72,12 +72,12 @@ ReadKeyStrokeWorker (
//
for (Link = TerminalDevice->NotifyList.ForwardLink; Link != &TerminalDevice->NotifyList; Link = Link->ForwardLink) {
CurrentNotify = CR (
Link,
TERMINAL_CONSOLE_IN_EX_NOTIFY,
NotifyEntry,
Link,
TERMINAL_CONSOLE_IN_EX_NOTIFY,
NotifyEntry,
TERMINAL_CONSOLE_IN_EX_NOTIFY_SIGNATURE
);
if (IsKeyRegistered (&CurrentNotify->KeyData, KeyData)) {
if (IsKeyRegistered (&CurrentNotify->KeyData, KeyData)) {
CurrentNotify->KeyNotificationFn (KeyData);
}
}
@@ -95,25 +95,25 @@ TerminalConInReset (
)
/*++
Routine Description:
Implements EFI_SIMPLE_TEXT_INPUT_PROTOCOL.Reset().
This driver only perform dependent serial device reset regardless of
This driver only perform dependent serial device reset regardless of
the value of ExtendeVerification
Arguments:
This - Indicates the calling context.
ExtendedVerification - Skip by this driver.
Returns:
EFI_SUCCESS
The reset operation succeeds.
The reset operation succeeds.
EFI_DEVICE_ERROR
The dependent serial port reset fails.
--*/
{
EFI_STATUS Status;
@@ -158,27 +158,27 @@ TerminalConInReadKeyStroke (
)
/*++
Routine Description:
Implements EFI_SIMPLE_TEXT_INPUT_PROTOCOL.ReadKeyStroke().
Arguments:
This - Indicates the calling context.
Key - A pointer to a buffer that is filled in with the keystroke
information for the key that was sent from terminal.
information for the key that was sent from terminal.
Returns:
EFI_SUCCESS
The keystroke information is returned successfully.
EFI_NOT_READY
There is no keystroke data available.
EFI_DEVICE_ERROR
The dependent serial device encounters error.
--*/
{
TERMINAL_DEV *TerminalDevice;
@@ -213,24 +213,24 @@ Routine Description:
Arguments:
RegsiteredData - A pointer to a buffer that is filled in with the keystroke
RegsiteredData - A pointer to a buffer that is filled in with the keystroke
state data for the key that was registered.
InputData - A pointer to a buffer that is filled in with the keystroke
InputData - A pointer to a buffer that is filled in with the keystroke
state data for the key that was pressed.
Returns:
TRUE - Key be pressed matches a registered key.
FLASE - Match failed.
FLASE - Match failed.
--*/
{
ASSERT (RegsiteredData != NULL && InputData != NULL);
if ((RegsiteredData->Key.ScanCode != InputData->Key.ScanCode) ||
(RegsiteredData->Key.UnicodeChar != InputData->Key.UnicodeChar)) {
return FALSE;
}
return FALSE;
}
return TRUE;
}
@@ -243,24 +243,24 @@ TerminalConInWaitForKeyEx (
)
/*++
Routine Description:
Event notification function for EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL.WaitForKeyEx event
Signal the event if there is key available
Signal the event if there is key available
Arguments:
Event - Indicates the event that invoke this function.
Context - Indicates the calling context.
Returns:
N/A
--*/
{
TERMINAL_DEV *TerminalDevice;
TerminalDevice = TERMINAL_CON_IN_EX_DEV_FROM_THIS (Context);
TerminalConInWaitForKey (Event, &TerminalDevice->SimpleInput);
@@ -288,7 +288,7 @@ TerminalConInResetEx (
Returns:
EFI_SUCCESS - The device was reset.
EFI_DEVICE_ERROR - The device is not functioning properly and could
EFI_DEVICE_ERROR - The device is not functioning properly and could
not be reset.
--*/
@@ -304,7 +304,7 @@ TerminalConInResetEx (
}
return EFI_SUCCESS;
}
EFI_STATUS
@@ -316,20 +316,20 @@ TerminalConInReadKeyStrokeEx (
/*++
Routine Description:
Reads the next keystroke from the input device. The WaitForKey Event can
Reads the next keystroke from the input device. The WaitForKey Event can
be used to test for existance of a keystroke via WaitForEvent () call.
Arguments:
This - Protocol instance pointer.
KeyData - A pointer to a buffer that is filled in with the keystroke
KeyData - A pointer to a buffer that is filled in with the keystroke
state data for the key that was pressed.
Returns:
EFI_SUCCESS - The keystroke information was returned.
EFI_NOT_READY - There was no keystroke data availiable.
EFI_DEVICE_ERROR - The keystroke information was not returned due to
EFI_DEVICE_ERROR - The keystroke information was not returned due to
hardware errors.
EFI_INVALID_PARAMETER - KeyData is NULL.
EFI_INVALID_PARAMETER - KeyData is NULL.
--*/
{
@@ -337,7 +337,7 @@ TerminalConInReadKeyStrokeEx (
if (KeyData == NULL) {
return EFI_INVALID_PARAMETER;
}
}
TerminalDevice = TERMINAL_CON_IN_EX_DEV_FROM_THIS (This);
@@ -358,17 +358,17 @@ TerminalConInSetState (
Arguments:
This - Protocol instance pointer.
KeyToggleState - A pointer to the EFI_KEY_TOGGLE_STATE to set the
KeyToggleState - A pointer to the EFI_KEY_TOGGLE_STATE to set the
state for the input device.
Returns:
Returns:
EFI_SUCCESS - The device state was set successfully.
EFI_DEVICE_ERROR - The device is not functioning correctly and could
EFI_DEVICE_ERROR - The device is not functioning correctly and could
not have the setting adjusted.
EFI_UNSUPPORTED - The device does not have the ability to set its state.
EFI_INVALID_PARAMETER - KeyToggleState is NULL.
EFI_INVALID_PARAMETER - KeyToggleState is NULL.
--*/
--*/
{
if (KeyToggleState == NULL) {
return EFI_INVALID_PARAMETER;
@@ -392,24 +392,24 @@ TerminalConInRegisterKeyNotify (
Arguments:
This - Protocol instance pointer.
KeyData - A pointer to a buffer that is filled in with the keystroke
KeyData - A pointer to a buffer that is filled in with the keystroke
information data for the key that was pressed.
KeyNotificationFunction - Points to the function to be called when the key
sequence is typed specified by KeyData.
NotifyHandle - Points to the unique handle assigned to the registered notification.
KeyNotificationFunction - Points to the function to be called when the key
sequence is typed specified by KeyData.
NotifyHandle - Points to the unique handle assigned to the registered notification.
Returns:
EFI_SUCCESS - The notification function was registered successfully.
EFI_OUT_OF_RESOURCES - Unable to allocate resources for necesssary data structures.
EFI_INVALID_PARAMETER - KeyData or NotifyHandle is NULL.
--*/
EFI_INVALID_PARAMETER - KeyData or NotifyHandle is NULL.
--*/
{
EFI_STATUS Status;
TERMINAL_DEV *TerminalDevice;
TERMINAL_CONSOLE_IN_EX_NOTIFY *NewNotify;
LIST_ENTRY *Link;
TERMINAL_CONSOLE_IN_EX_NOTIFY *CurrentNotify;
TERMINAL_CONSOLE_IN_EX_NOTIFY *CurrentNotify;
if (KeyData == NULL || NotifyHandle == NULL || KeyNotificationFunction == NULL) {
return EFI_INVALID_PARAMETER;
@@ -422,14 +422,14 @@ TerminalConInRegisterKeyNotify (
//
for (Link = TerminalDevice->NotifyList.ForwardLink; Link != &TerminalDevice->NotifyList; Link = Link->ForwardLink) {
CurrentNotify = CR (
Link,
TERMINAL_CONSOLE_IN_EX_NOTIFY,
NotifyEntry,
Link,
TERMINAL_CONSOLE_IN_EX_NOTIFY,
NotifyEntry,
TERMINAL_CONSOLE_IN_EX_NOTIFY_SIGNATURE
);
if (IsKeyRegistered (&CurrentNotify->KeyData, KeyData)) {
if (IsKeyRegistered (&CurrentNotify->KeyData, KeyData)) {
if (CurrentNotify->KeyNotificationFn == KeyNotificationFunction) {
*NotifyHandle = CurrentNotify->NotifyHandle;
*NotifyHandle = CurrentNotify->NotifyHandle;
return EFI_SUCCESS;
}
}
@@ -437,19 +437,19 @@ TerminalConInRegisterKeyNotify (
//
// Allocate resource to save the notification function
//
//
NewNotify = (TERMINAL_CONSOLE_IN_EX_NOTIFY *) AllocateZeroPool (sizeof (TERMINAL_CONSOLE_IN_EX_NOTIFY));
if (NewNotify == NULL) {
return EFI_OUT_OF_RESOURCES;
}
}
NewNotify->Signature = TERMINAL_CONSOLE_IN_EX_NOTIFY_SIGNATURE;
NewNotify->Signature = TERMINAL_CONSOLE_IN_EX_NOTIFY_SIGNATURE;
NewNotify->KeyNotificationFn = KeyNotificationFunction;
CopyMem (&NewNotify->KeyData, KeyData, sizeof (KeyData));
InsertTailList (&TerminalDevice->NotifyList, &NewNotify->NotifyEntry);
//
// Use gSimpleTextInExNotifyGuid to get a valid EFI_HANDLE
//
//
Status = gBS->InstallMultipleProtocolInterfaces (
&NewNotify->NotifyHandle,
&gSimpleTextInExNotifyGuid,
@@ -457,7 +457,7 @@ TerminalConInRegisterKeyNotify (
NULL
);
ASSERT_EFI_ERROR (Status);
*NotifyHandle = NewNotify->NotifyHandle;
*NotifyHandle = NewNotify->NotifyHandle;
return EFI_SUCCESS;
}
@@ -474,15 +474,15 @@ TerminalConInUnregisterKeyNotify (
Remove a registered notification function from a particular keystroke.
Arguments:
This - Protocol instance pointer.
This - Protocol instance pointer.
NotificationHandle - The handle of the notification function being unregistered.
Returns:
EFI_SUCCESS - The notification function was unregistered successfully.
EFI_INVALID_PARAMETER - The NotificationHandle is invalid.
EFI_NOT_FOUND - Can not find the matching entry in database.
--*/
EFI_NOT_FOUND - Can not find the matching entry in database.
--*/
{
EFI_STATUS Status;
TERMINAL_DEV *TerminalDevice;
@@ -491,8 +491,8 @@ TerminalConInUnregisterKeyNotify (
if (NotificationHandle == NULL) {
return EFI_INVALID_PARAMETER;
}
}
Status = gBS->OpenProtocol (
NotificationHandle,
&gSimpleTextInExNotifyGuid,
@@ -509,16 +509,16 @@ TerminalConInUnregisterKeyNotify (
for (Link = TerminalDevice->NotifyList.ForwardLink; Link != &TerminalDevice->NotifyList; Link = Link->ForwardLink) {
CurrentNotify = CR (
Link,
TERMINAL_CONSOLE_IN_EX_NOTIFY,
NotifyEntry,
Link,
TERMINAL_CONSOLE_IN_EX_NOTIFY,
NotifyEntry,
TERMINAL_CONSOLE_IN_EX_NOTIFY_SIGNATURE
);
if (CurrentNotify->NotifyHandle == NotificationHandle) {
//
// Remove the notification function from NotifyList and free resources
//
RemoveEntryList (&CurrentNotify->NotifyEntry);
RemoveEntryList (&CurrentNotify->NotifyEntry);
Status = gBS->UninstallMultipleProtocolInterfaces (
CurrentNotify->NotifyHandle,
&gSimpleTextInExNotifyGuid,
@@ -526,12 +526,12 @@ TerminalConInUnregisterKeyNotify (
NULL
);
ASSERT_EFI_ERROR (Status);
gBS->FreePool (CurrentNotify);
gBS->FreePool (CurrentNotify);
return EFI_SUCCESS;
}
}
return EFI_NOT_FOUND;
return EFI_NOT_FOUND;
}
@@ -541,7 +541,7 @@ TranslateRawDataToEfiKey (
)
/*++
Step1: Turn raw data into Unicode (according to different encode).
Step2: Translate Unicode into key information.
Step2: Translate Unicode into key information.
(according to different terminal standard).
--*/
{
@@ -579,20 +579,20 @@ TerminalConInWaitForKey (
)
/*++
Routine Description:
Event notification function for EFI_SIMPLE_TEXT_INPUT_PROTOCOL.WaitForKey event
Signal the event if there is key available
Signal the event if there is key available
Arguments:
Event - Indicates the event that invoke this function.
Context - Indicates the calling context.
Returns:
N/A
--*/
{
//
@@ -613,23 +613,23 @@ TerminalConInCheckForKey (
)
/*++
Routine Description:
Check for a pending key in the Efi Key FIFO or Serial device buffer.
Arguments:
This - Indicates the calling context.
Returns:
EFI_SUCCESS
There is key pending.
There is key pending.
EFI_NOT_READY
There is no key pending.
EFI_DEVICE_ERROR
--*/
{
EFI_STATUS Status;
@@ -741,7 +741,7 @@ GetOneKeyFromSerial (
Get one key out of serial buffer.
If serial buffer is empty, return EFI_NOT_READY;
if reading serial buffer encounter error, returns EFI_DEVICE_ERROR;
if reading serial buffer successfully, put the fetched key to
if reading serial buffer successfully, put the fetched key to
the parameter "Input", and return EFI_SUCCESS.
--*/
{
@@ -1130,33 +1130,33 @@ UnicodeToEfiKey (
)
/*++
Routine Description:
Converts a stream of Unicode characters from a terminal input device into EFI Keys that
can be read through the Simple Input Protocol. The table below shows the keyboard
input mappings that this function supports. If the ESC sequence listed in one of the
input mappings that this function supports. If the ESC sequence listed in one of the
columns is presented, then it is translated into the coorespoding EFI Scan Code. If a
matching sequence is not found, then the raw key strokes are converted into EFI Keys.
2 seconds are allowed for an ESC sequence to be completed. If the ESC sequence is not
completed in 2 seconds, then the raw key strokes of the partial ESC sequence are
2 seconds are allowed for an ESC sequence to be completed. If the ESC sequence is not
completed in 2 seconds, then the raw key strokes of the partial ESC sequence are
converted into EFI Keys.
There is one special input sequence that will force the system to reset.
There is one special input sequence that will force the system to reset.
This is ESC R ESC r ESC R.
Arguments:
TerminaDevice : The terminal device to use to translate raw input into EFI Keys
Returns:
None
Symbols used in table below
===========================
ESC = 0x1B
CSI = 0x9B
DEL = 0x7f
ESC = 0x1B
CSI = 0x9B
DEL = 0x7f
^ = CTRL
+=========+======+===========+==========+==========+
@@ -1167,7 +1167,7 @@ Symbols used in table below
| NULL | 0x00 | | | |
| UP | 0x01 | ESC [ A | ESC [ A | ESC [ A |
| DOWN | 0x02 | ESC [ B | ESC [ B | ESC [ B |
| RIGHT | 0x03 | ESC [ C | ESC [ C | ESC [ C |
| RIGHT | 0x03 | ESC [ C | ESC [ C | ESC [ C |
| LEFT | 0x04 | ESC [ D | ESC [ D | ESC [ D |
| HOME | 0x05 | ESC [ H | ESC h | ESC [ H |
| END | 0x06 | ESC [ F | ESC k | ESC [ K |
@@ -1204,7 +1204,7 @@ ESC R ESC r ESC R = Reset System
UINT16 UnicodeChar;
EFI_INPUT_KEY Key;
BOOLEAN SetDefaultResetState;
TimerStatus = gBS->CheckEvent (TerminalDevice->TwoSecondTimeOut);
if (!EFI_ERROR (TimerStatus)) {
@@ -1213,7 +1213,7 @@ ESC R ESC r ESC R = Reset System
}
while (!IsUnicodeFiFoEmpty(TerminalDevice)) {
if (TerminalDevice->InputState != INPUT_STATE_DEFAULT) {
//
// Check to see if the 2 second timer has expired
@@ -1252,71 +1252,71 @@ ESC R ESC r ESC R = Reset System
}
Key.ScanCode = SCAN_NULL;
if (TerminalDevice->TerminalType == VT100PlusType ||
if (TerminalDevice->TerminalType == VT100PlusType ||
TerminalDevice->TerminalType == VTUTF8Type) {
switch (UnicodeChar) {
case '1':
Key.ScanCode = SCAN_F1;
case '1':
Key.ScanCode = SCAN_F1;
break;
case '2':
Key.ScanCode = SCAN_F2;
case '2':
Key.ScanCode = SCAN_F2;
break;
case '3':
Key.ScanCode = SCAN_F3;
case '3':
Key.ScanCode = SCAN_F3;
break;
case '4':
Key.ScanCode = SCAN_F4;
case '4':
Key.ScanCode = SCAN_F4;
break;
case '5':
Key.ScanCode = SCAN_F5;
case '5':
Key.ScanCode = SCAN_F5;
break;
case '6':
Key.ScanCode = SCAN_F6;
case '6':
Key.ScanCode = SCAN_F6;
break;
case '7':
Key.ScanCode = SCAN_F7;
case '7':
Key.ScanCode = SCAN_F7;
break;
case '8':
Key.ScanCode = SCAN_F8;
case '8':
Key.ScanCode = SCAN_F8;
break;
case '9':
Key.ScanCode = SCAN_F9;
case '9':
Key.ScanCode = SCAN_F9;
break;
case '0':
Key.ScanCode = SCAN_F10;
case '0':
Key.ScanCode = SCAN_F10;
break;
case '!':
Key.ScanCode = SCAN_F11;
break;
case '@':
Key.ScanCode = SCAN_F12;
break;
case 'h':
Key.ScanCode = SCAN_HOME;
break;
case 'k':
Key.ScanCode = SCAN_END;
case 'h':
Key.ScanCode = SCAN_HOME;
break;
case '+':
Key.ScanCode = SCAN_INSERT;
case 'k':
Key.ScanCode = SCAN_END;
break;
case '-':
Key.ScanCode = SCAN_DELETE;
case '+':
Key.ScanCode = SCAN_INSERT;
break;
case '/':
Key.ScanCode = SCAN_PAGE_DOWN;
case '-':
Key.ScanCode = SCAN_DELETE;
break;
case '?':
Key.ScanCode = SCAN_PAGE_UP;
break;
default :
case '/':
Key.ScanCode = SCAN_PAGE_DOWN;
break;
case '?':
Key.ScanCode = SCAN_PAGE_UP;
break;
default :
break;
}
}
switch (UnicodeChar) {
case 'R':
case 'R':
if (TerminalDevice->ResetState == RESET_STATE_DEFAULT) {
TerminalDevice->ResetState = RESET_STATE_ESC_R;
SetDefaultResetState = FALSE;
@@ -1325,14 +1325,14 @@ ESC R ESC r ESC R = Reset System
}
Key.ScanCode = SCAN_NULL;
break;
case 'r':
case 'r':
if (TerminalDevice->ResetState == RESET_STATE_ESC_R) {
TerminalDevice->ResetState = RESET_STATE_ESC_R_ESC_r;
SetDefaultResetState = FALSE;
}
Key.ScanCode = SCAN_NULL;
break;
default :
default :
break;
}
@@ -1357,40 +1357,40 @@ ESC R ESC r ESC R = Reset System
TerminalDevice->ResetState = RESET_STATE_DEFAULT;
Key.ScanCode = SCAN_NULL;
if (TerminalDevice->TerminalType == VT100Type) {
switch (UnicodeChar) {
case 'P':
Key.ScanCode = SCAN_F1;
case 'P':
Key.ScanCode = SCAN_F1;
break;
case 'Q':
Key.ScanCode = SCAN_F2;
case 'Q':
Key.ScanCode = SCAN_F2;
break;
case 'w':
Key.ScanCode = SCAN_F3;
case 'w':
Key.ScanCode = SCAN_F3;
break;
case 'x':
Key.ScanCode = SCAN_F4;
case 'x':
Key.ScanCode = SCAN_F4;
break;
case 't':
Key.ScanCode = SCAN_F5;
case 't':
Key.ScanCode = SCAN_F5;
break;
case 'u':
Key.ScanCode = SCAN_F6;
case 'u':
Key.ScanCode = SCAN_F6;
break;
case 'q':
Key.ScanCode = SCAN_F7;
case 'q':
Key.ScanCode = SCAN_F7;
break;
case 'r':
Key.ScanCode = SCAN_F8;
case 'r':
Key.ScanCode = SCAN_F8;
break;
case 'p':
Key.ScanCode = SCAN_F9;
case 'p':
Key.ScanCode = SCAN_F9;
break;
case 'M':
Key.ScanCode = SCAN_F10;
case 'M':
Key.ScanCode = SCAN_F10;
break;
default :
default :
break;
}
}
@@ -1408,127 +1408,127 @@ ESC R ESC r ESC R = Reset System
break;
case INPUT_STATE_ESC | INPUT_STATE_LEFTOPENBRACKET:
TerminalDevice->ResetState = RESET_STATE_DEFAULT;
Key.ScanCode = SCAN_NULL;
if (TerminalDevice->TerminalType == PcAnsiType ||
TerminalDevice->TerminalType == VT100Type ||
TerminalDevice->TerminalType == VT100PlusType ||
TerminalDevice->TerminalType == VT100PlusType ||
TerminalDevice->TerminalType == VTUTF8Type) {
switch (UnicodeChar) {
case 'A':
Key.ScanCode = SCAN_UP;
case 'A':
Key.ScanCode = SCAN_UP;
break;
case 'B':
Key.ScanCode = SCAN_DOWN;
case 'B':
Key.ScanCode = SCAN_DOWN;
break;
case 'C':
Key.ScanCode = SCAN_RIGHT;
case 'C':
Key.ScanCode = SCAN_RIGHT;
break;
case 'D':
Key.ScanCode = SCAN_LEFT;
case 'D':
Key.ScanCode = SCAN_LEFT;
break;
case 'H':
case 'H':
if (TerminalDevice->TerminalType == PcAnsiType ||
TerminalDevice->TerminalType == VT100Type) {
Key.ScanCode = SCAN_HOME;
Key.ScanCode = SCAN_HOME;
}
break;
case 'F':
case 'F':
if (TerminalDevice->TerminalType == PcAnsiType) {
Key.ScanCode = SCAN_END;
}
break;
case 'K':
case 'K':
if (TerminalDevice->TerminalType == VT100Type) {
Key.ScanCode = SCAN_END;
Key.ScanCode = SCAN_END;
}
break;
case 'L':
case '@':
case 'L':
case '@':
if (TerminalDevice->TerminalType == PcAnsiType ||
TerminalDevice->TerminalType == VT100Type) {
Key.ScanCode = SCAN_INSERT;
Key.ScanCode = SCAN_INSERT;
}
break;
case 'X':
case 'X':
if (TerminalDevice->TerminalType == PcAnsiType) {
Key.ScanCode = SCAN_DELETE;
}
break;
case 'P':
case 'P':
if (TerminalDevice->TerminalType == VT100Type) {
Key.ScanCode = SCAN_DELETE;
Key.ScanCode = SCAN_DELETE;
} else if (TerminalDevice->TerminalType == PcAnsiType) {
Key.ScanCode = SCAN_F4;
}
break;
case 'I':
case 'I':
if (TerminalDevice->TerminalType == PcAnsiType) {
Key.ScanCode = SCAN_PAGE_UP;
}
break;
case 'V':
break;
case 'V':
if (TerminalDevice->TerminalType == PcAnsiType) {
Key.ScanCode = SCAN_F10;
}
case '?':
}
case '?':
if (TerminalDevice->TerminalType == VT100Type) {
Key.ScanCode = SCAN_PAGE_UP;
Key.ScanCode = SCAN_PAGE_UP;
}
break;
case 'G':
case 'G':
if (TerminalDevice->TerminalType == PcAnsiType) {
Key.ScanCode = SCAN_PAGE_DOWN;
}
break;
case 'U':
break;
case 'U':
if (TerminalDevice->TerminalType == PcAnsiType) {
Key.ScanCode = SCAN_F9;
}
case '/':
case '/':
if (TerminalDevice->TerminalType == VT100Type) {
Key.ScanCode = SCAN_PAGE_DOWN;
Key.ScanCode = SCAN_PAGE_DOWN;
}
break;
case 'M':
case 'M':
if (TerminalDevice->TerminalType == PcAnsiType) {
Key.ScanCode = SCAN_F1;
}
break;
case 'N':
break;
case 'N':
if (TerminalDevice->TerminalType == PcAnsiType) {
Key.ScanCode = SCAN_F2;
}
break;
case 'O':
break;
case 'O':
if (TerminalDevice->TerminalType == PcAnsiType) {
Key.ScanCode = SCAN_F3;
}
break;
case 'Q':
break;
case 'Q':
if (TerminalDevice->TerminalType == PcAnsiType) {
Key.ScanCode = SCAN_F5;
}
break;
case 'R':
break;
case 'R':
if (TerminalDevice->TerminalType == PcAnsiType) {
Key.ScanCode = SCAN_F6;
}
break;
case 'S':
break;
case 'S':
if (TerminalDevice->TerminalType == PcAnsiType) {
Key.ScanCode = SCAN_F7;
}
break;
case 'T':
break;
case 'T':
if (TerminalDevice->TerminalType == PcAnsiType) {
Key.ScanCode = SCAN_F8;
}
break;
default :
break;
default :
break;
}
}
@@ -1545,7 +1545,7 @@ ESC R ESC r ESC R = Reset System
break;
default:
//
// Invalid state. This should never happen.
@@ -1564,7 +1564,7 @@ ESC R ESC r ESC R = Reset System
if (UnicodeChar == CSI) {
TerminalDevice->InputState = INPUT_STATE_CSI;
}
if (TerminalDevice->InputState != INPUT_STATE_DEFAULT) {
Status = gBS->SetTimer(
TerminalDevice->TwoSecondTimeOut,