+ );\r
+\r
+/**\r
+ Check if the key already has been registered.\r
+\r
+ @param RegsiteredData A pointer to a buffer that is filled in with the\r
+ keystroke state data for the key that was\r
+ registered.\r
+ @param InputData A pointer to a buffer that is filled in with the\r
+ keystroke state data for the key that was\r
+ pressed.\r
+\r
+ @retval TRUE Key be pressed matches a registered key.\r
+ @retval FLASE Match failed.\r
+\r
+**/\r
+BOOLEAN\r
+IsKeyRegistered (\r
+ IN EFI_KEY_DATA *RegsiteredData,\r
+ IN EFI_KEY_DATA *InputData\r
+ );\r
+\r
+/**\r
+ Event notification function for EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL.WaitForKeyEx event\r
+ Signal the event if there is key available\r
+\r
+ @param Event Indicates the event that invoke this function.\r
+ @param Context Indicates the calling context.\r
+\r
+**/\r
+VOID\r
+EFIAPI\r
+TerminalConInWaitForKeyEx (\r
+ IN EFI_EVENT Event,\r
+ IN VOID *Context\r
+ );\r
+\r
+//\r
+// Simple Text Input Ex protocol prototypes\r
+//\r
+\r
+/**\r
+ Reset the input device and optionally run diagnostics\r
+\r
+ @param This Protocol instance pointer.\r
+ @param ExtendedVerification Driver may perform diagnostics on reset.\r
+\r
+ @retval EFI_SUCCESS The device was reset.\r
+ @retval EFI_DEVICE_ERROR The device is not functioning properly and could\r
+ not be reset.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+TerminalConInResetEx (\r
+ IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,\r
+ IN BOOLEAN ExtendedVerification\r
+ );\r
+\r
+/**\r
+ Reads the next keystroke from the input device. The WaitForKey Event can\r
+ be used to test for existence of a keystroke via WaitForEvent () call.\r
+\r
+ @param This Protocol instance pointer.\r
+ @param KeyData A pointer to a buffer that is filled in with the\r
+ keystroke state data for the key that was\r
+ pressed.\r
+\r
+ @retval EFI_SUCCESS The keystroke information was returned.\r
+ @retval EFI_NOT_READY There was no keystroke data available.\r
+ @retval EFI_DEVICE_ERROR The keystroke information was not returned due\r
+ to hardware errors.\r
+ @retval EFI_INVALID_PARAMETER KeyData is NULL.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+TerminalConInReadKeyStrokeEx (\r
+ IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,\r
+ OUT EFI_KEY_DATA *KeyData\r
+ );\r
+\r
+/**\r
+ Set certain state for the input device.\r
+\r
+ @param This Protocol instance pointer.\r
+ @param KeyToggleState A pointer to the EFI_KEY_TOGGLE_STATE to set the\r
+ state for the input device.\r
+\r
+ @retval EFI_SUCCESS The device state was set successfully.\r
+ @retval EFI_DEVICE_ERROR The device is not functioning correctly and\r
+ could not have the setting adjusted.\r
+ @retval EFI_UNSUPPORTED The device does not have the ability to set its\r
+ state.\r
+ @retval EFI_INVALID_PARAMETER KeyToggleState is NULL.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+TerminalConInSetState (\r
+ IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,\r
+ IN EFI_KEY_TOGGLE_STATE *KeyToggleState\r
+ );\r
+\r
+/**\r
+ Register a notification function for a particular keystroke for the input device.\r
+\r
+ @param This Protocol instance pointer.\r
+ @param KeyData A pointer to a buffer that is filled in with the\r
+ keystroke information data for the key that was\r
+ pressed.\r
+ @param KeyNotificationFunction Points to the function to be called when the key\r
+ sequence is typed specified by KeyData.\r
+ @param NotifyHandle Points to the unique handle assigned to the\r
+ registered notification.\r
+\r
+ @retval EFI_SUCCESS The notification function was registered\r
+ successfully.\r
+ @retval EFI_OUT_OF_RESOURCES Unable to allocate resources for necesssary data\r
+ structures.\r
+ @retval EFI_INVALID_PARAMETER KeyData or NotifyHandle is NULL.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+TerminalConInRegisterKeyNotify (\r
+ IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,\r
+ IN EFI_KEY_DATA *KeyData,\r
+ IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction,\r
+ OUT EFI_HANDLE *NotifyHandle\r
+ );\r
+\r
+/**\r
+ Remove a registered notification function from a particular keystroke.\r
+\r
+ @param This Protocol instance pointer.\r
+ @param NotificationHandle The handle of the notification function being\r
+ unregistered.\r
+\r
+ @retval EFI_SUCCESS The notification function was unregistered\r
+ successfully.\r
+ @retval EFI_INVALID_PARAMETER The NotificationHandle is invalid.\r
+ @retval EFI_NOT_FOUND Can not find the matching entry in database.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+TerminalConInUnregisterKeyNotify (\r
+ IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,\r
+ IN EFI_HANDLE NotificationHandle\r
+ );\r
+\r
+/**\r
+ Event notification function for EFI_SIMPLE_TEXT_INPUT_PROTOCOL.WaitForKey event\r
+ Signal the event if there is key available\r
+\r
+ @param Event Indicates the event that invoke this function.\r
+ @param Context Indicates the calling context.\r