]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.h
1. Retired HotPlugDevice protocol.
[mirror_edk2.git] / MdeModulePkg / Bus / Usb / UsbKbDxe / EfiKey.h
index 506a08ce24f699caba72afabb3fdbd50568a754a..73191e6a272a196cbe22c1107792e14e1b8f57d7 100644 (file)
@@ -22,8 +22,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Protocol/HiiDatabase.h>\r
 #include <Protocol/UsbIo.h>\r
 #include <Protocol/DevicePath.h>\r
+#include <Protocol/SimpleTextInExNotify.h>\r
+\r
 #include <Guid/HiiKeyBoardLayout.h>\r
-#include <Guid/HotPlugDevice.h>\r
 \r
 #include <Library/DebugLib.h>\r
 #include <Library/ReportStatusCodeLib.h>\r
@@ -35,8 +36,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Library/MemoryAllocationLib.h>\r
 #include <Library/PcdLib.h>\r
 #include <Library/UefiUsbLib.h>\r
-#include <Library/BaseLib.h>\r
-#include <Library/UefiUsbLib.h>\r
 \r
 #include <IndustryStandard/Usb.h>\r
 \r
@@ -54,8 +53,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #define REPORT_PROTOCOL     1\r
 \r
 typedef struct {\r
-  UINT8 Down;\r
-  UINT8 KeyCode;\r
+  BOOLEAN  Down;\r
+  UINT8    KeyCode;\r
 } USB_KEY;\r
 \r
 typedef struct {\r
@@ -64,8 +63,8 @@ typedef struct {
   UINT8   BufferTail;\r
 } USB_KB_BUFFER;\r
 \r
-#define USB_KB_DEV_SIGNATURE  EFI_SIGNATURE_32 ('u', 'k', 'b', 'd')\r
-#define USB_KB_CONSOLE_IN_EX_NOTIFY_SIGNATURE EFI_SIGNATURE_32 ('u', 'k', 'b', 'x')\r
+#define USB_KB_DEV_SIGNATURE  SIGNATURE_32 ('u', 'k', 'b', 'd')\r
+#define USB_KB_CONSOLE_IN_EX_NOTIFY_SIGNATURE SIGNATURE_32 ('u', 'k', 'b', 'x')\r
 \r
 typedef struct _KEYBOARD_CONSOLE_IN_EX_NOTIFY {\r
   UINTN                                 Signature;\r
@@ -75,7 +74,7 @@ typedef struct _KEYBOARD_CONSOLE_IN_EX_NOTIFY {
   LIST_ENTRY                            NotifyEntry;\r
 } KEYBOARD_CONSOLE_IN_EX_NOTIFY;\r
 \r
-#define USB_NS_KEY_SIGNATURE  EFI_SIGNATURE_32 ('u', 'n', 's', 'k')\r
+#define USB_NS_KEY_SIGNATURE  SIGNATURE_32 ('u', 'n', 's', 'k')\r
 \r
 typedef struct {\r
   UINTN                         Signature;\r
@@ -110,31 +109,31 @@ typedef struct {
   EFI_USB_ENDPOINT_DESCRIPTOR       IntEndpointDescriptor;\r
 \r
   USB_KB_BUFFER                     KeyboardBuffer;\r
-  UINT8                             CtrlOn;\r
-  UINT8                             AltOn;\r
-  UINT8                             ShiftOn;\r
-  UINT8                             NumLockOn;\r
-  UINT8                             CapsOn;\r
-  UINT8                             ScrollOn;\r
+  BOOLEAN                           CtrlOn;\r
+  BOOLEAN                           AltOn;\r
+  BOOLEAN                           ShiftOn;\r
+  BOOLEAN                           NumLockOn;\r
+  BOOLEAN                           CapsOn;\r
+  BOOLEAN                           ScrollOn;\r
   UINT8                             LastKeyCodeArray[8];\r
-  UINT8                             CurKeyChar;\r
+  UINT8                             CurKeyCode;\r
 \r
   UINT8                             RepeatKey;\r
   EFI_EVENT                         RepeatTimer;\r
 \r
   EFI_UNICODE_STRING_TABLE          *ControllerNameTable;\r
   \r
-  UINT8                             LeftCtrlOn;\r
-  UINT8                             LeftAltOn;\r
-  UINT8                             LeftShiftOn;\r
-  UINT8                             LeftLogoOn;\r
-  UINT8                             RightCtrlOn;\r
-  UINT8                             RightAltOn;\r
-  UINT8                             RightShiftOn;\r
-  UINT8                             RightLogoOn;  \r
-  UINT8                             MenuKeyOn;\r
-  UINT8                             SysReqOn;\r
-  UINT8                             AltGrOn;\r
+  BOOLEAN                           LeftCtrlOn;\r
+  BOOLEAN                           LeftAltOn;\r
+  BOOLEAN                           LeftShiftOn;\r
+  BOOLEAN                           LeftLogoOn;\r
+  BOOLEAN                           RightCtrlOn;\r
+  BOOLEAN                           RightAltOn;\r
+  BOOLEAN                           RightShiftOn;\r
+  BOOLEAN                           RightLogoOn;  \r
+  BOOLEAN                           MenuKeyOn;\r
+  BOOLEAN                           SysReqOn;\r
+  BOOLEAN                           AltGrOn;\r
 \r
   EFI_KEY_STATE                     KeyState;\r
   //\r
@@ -157,31 +156,26 @@ typedef struct {
 extern EFI_DRIVER_BINDING_PROTOCOL   gUsbKeyboardDriverBinding;\r
 extern EFI_COMPONENT_NAME_PROTOCOL   gUsbKeyboardComponentName;\r
 extern EFI_COMPONENT_NAME2_PROTOCOL  gUsbKeyboardComponentName2;\r
-extern EFI_GUID                      gSimpleTextInExNotifyGuid;\r
 \r
 #define USB_KB_DEV_FROM_THIS(a) \\r
     CR(a, USB_KB_DEV, SimpleInput, USB_KB_DEV_SIGNATURE)\r
 #define TEXT_INPUT_EX_USB_KB_DEV_FROM_THIS(a) \\r
     CR(a, USB_KB_DEV, SimpleInputEx, USB_KB_DEV_SIGNATURE)\r
 \r
-\r
-#define MOD_CONTROL_L           0x01\r
-#define MOD_CONTROL_R           0x10\r
-#define MOD_SHIFT_L             0x02\r
-#define MOD_SHIFT_R             0x20\r
-#define MOD_ALT_L               0x04\r
-#define MOD_ALT_R               0x40\r
-#define MOD_WIN_L               0x08\r
-#define MOD_WIN_R               0x80\r
-\r
-typedef struct {\r
-  UINT8 Mask;\r
-  UINT8 Key;\r
-} KB_MODIFIER;\r
-\r
-#define USB_KEYCODE_MAX_MAKE      0x62\r
-\r
-#define USBKBD_VALID_KEYCODE(key) ((UINT8) (key) > 3)\r
+//\r
+// According to Universal Serial Bus HID Usage Tables document ver 1.12,\r
+// a Boot Keyboard should support the keycode range from 0x0 to 0x65 and 0xE0 to 0xE7.\r
+// 0xE0 to 0xE7 are for modifier keys, and 0x0 to 0x3 are reserved for typical\r
+// keyboard status or keyboard errors.\r
+// So the number of valid non-modifier USB keycodes is 0x62, and the number of\r
+// valid keycodes is 0x6A.\r
+//\r
+#define NUMBER_OF_VALID_NON_MODIFIER_USB_KEYCODE      0x62\r
+#define NUMBER_OF_VALID_USB_KEYCODE                   0x6A\r
+//\r
+// 0x0 to 0x3 are reserved for typical keyboard status or keyboard errors.\r
+//\r
+#define USBKBD_VALID_KEYCODE(Key) ((UINT8) (Key) > 3)\r
 \r
 typedef struct {\r
   UINT8 NumLock : 1;\r
@@ -213,7 +207,11 @@ USBKeyboardDriverBindingSupported (
   );\r
 \r
 /**\r
-  Start running driver on the controller.\r
+  Starts the keyboard device with this driver.\r
+\r
+  This function produces Simple Text Input Protocol and Simple Text Input Ex Protocol,\r
+  initializes the keyboard device, and submit Asynchronous Interrupt Transfer to manage\r
+  this keyboard device.\r
 \r
   @param  This                   The USB keyboard driver binding instance.\r
   @param  Controller             Handle of device to bind driver to.\r
@@ -222,7 +220,7 @@ USBKeyboardDriverBindingSupported (
 \r
   @retval EFI_SUCCESS            The controller is controlled by the usb keyboard driver.\r
   @retval EFI_UNSUPPORTED        No interrupt endpoint can be found.\r
-  @retval Other                  The keyboard driver cannot support this controller.\r
+  @retval Other                  This controller cannot be started.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -234,17 +232,18 @@ USBKeyboardDriverBindingStart (
   );\r
 \r
 /**\r
-  Stop handling the controller by this USB keyboard driver.\r
+  Stop the USB keyboard device handled by this driver.\r
 \r
   @param  This                   The USB keyboard driver binding protocol.\r
   @param  Controller             The controller to release.\r
   @param  NumberOfChildren       The number of handles in ChildHandleBuffer.\r
   @param  ChildHandleBuffer      The array of child handle.\r
 \r
-  @retval EFI_SUCCESS            The controller or children are stopped.\r
+  @retval EFI_SUCCESS            The device was stopped.\r
   @retval EFI_UNSUPPORTED        Simple Text In Protocol or Simple Text In Ex Protocol\r
                                  is not installed on Controller.\r
-  @retval EFI_DEVICE_ERROR       Failed to stop the driver.\r
+  @retval EFI_DEVICE_ERROR       The device could not be stopped due to a device error.\r
+  @retval Others                 Fail to uninstall protocols attached on the device.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -256,24 +255,135 @@ USBKeyboardDriverBindingStop (
   IN  EFI_HANDLE                     *ChildHandleBuffer\r
   );\r
 \r
+//\r
+// EFI Component Name Functions\r
+//\r
+/**\r
+  Retrieves a Unicode string that is the user readable name of the driver.\r
+\r
+  This function retrieves the user readable name of a driver in the form of a\r
+  Unicode string. If the driver specified by This has a user readable name in\r
+  the language specified by Language, then a pointer to the driver name is\r
+  returned in DriverName, and EFI_SUCCESS is returned. If the driver specified\r
+  by This does not support the language specified by Language,\r
+  then EFI_UNSUPPORTED is returned.\r
+\r
+  @param  This                  A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or\r
+                                EFI_COMPONENT_NAME_PROTOCOL instance.\r
+  @param  Language              A pointer to a Null-terminated ASCII string\r
+                                array indicating the language. This is the\r
+                                language of the driver name that the caller is\r
+                                requesting, and it must match one of the\r
+                                languages specified in SupportedLanguages. The\r
+                                number of languages supported by a driver is up\r
+                                to the driver writer. Language is specified\r
+                                in RFC 3066 or ISO 639-2 language code format.\r
+  @param  DriverName            A pointer to the Unicode string to return.\r
+                                This Unicode string is the name of the\r
+                                driver specified by This in the language\r
+                                specified by Language.\r
+\r
+  @retval EFI_SUCCESS           The Unicode string for the Driver specified by\r
+                                This and the language specified by Language was\r
+                                returned in DriverName.\r
+  @retval EFI_INVALID_PARAMETER Language is NULL.\r
+  @retval EFI_INVALID_PARAMETER DriverName is NULL.\r
+  @retval EFI_UNSUPPORTED       The driver specified by This does not support\r
+                                the language specified by Language.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+UsbKeyboardComponentNameGetDriverName (\r
+  IN  EFI_COMPONENT_NAME_PROTOCOL  *This,\r
+  IN  CHAR8                        *Language,\r
+  OUT CHAR16                       **DriverName\r
+  );\r
+\r
+/**\r
+  Retrieves a Unicode string that is the user readable name of the controller\r
+  that is being managed by a driver.\r
+\r
+  This function retrieves the user readable name of the controller specified by\r
+  ControllerHandle and ChildHandle in the form of a Unicode string. If the\r
+  driver specified by This has a user readable name in the language specified by\r
+  Language, then a pointer to the controller name is returned in ControllerName,\r
+  and EFI_SUCCESS is returned.  If the driver specified by This is not currently\r
+  managing the controller specified by ControllerHandle and ChildHandle,\r
+  then EFI_UNSUPPORTED is returned.  If the driver specified by This does not\r
+  support the language specified by Language, then EFI_UNSUPPORTED is returned.\r
+\r
+  @param  This                  A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or\r
+                                EFI_COMPONENT_NAME_PROTOCOL instance.\r
+  @param  ControllerHandle      The handle of a controller that the driver\r
+                                specified by This is managing.  This handle\r
+                                specifies the controller whose name is to be\r
+                                returned.\r
+  @param  ChildHandle           The handle of the child controller to retrieve\r
+                                the name of.  This is an optional parameter that\r
+                                may be NULL.  It will be NULL for device\r
+                                drivers.  It will also be NULL for a bus drivers\r
+                                that wish to retrieve the name of the bus\r
+                                controller.  It will not be NULL for a bus\r
+                                driver that wishes to retrieve the name of a\r
+                                child controller.\r
+  @param  Language              A pointer to a Null-terminated ASCII string\r
+                                array indicating the language.  This is the\r
+                                language of the driver name that the caller is\r
+                                requesting, and it must match one of the\r
+                                languages specified in SupportedLanguages. The\r
+                                number of languages supported by a driver is up\r
+                                to the driver writer. Language is specified in\r
+                                RFC 3066 or ISO 639-2 language code format.\r
+  @param  ControllerName        A pointer to the Unicode string to return.\r
+                                This Unicode string is the name of the\r
+                                controller specified by ControllerHandle and\r
+                                ChildHandle in the language specified by\r
+                                Language from the point of view of the driver\r
+                                specified by This.\r
+\r
+  @retval EFI_SUCCESS           The Unicode string for the user readable name in\r
+                                the language specified by Language for the\r
+                                driver specified by This was returned in\r
+                                DriverName.\r
+  @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.\r
+  @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid\r
+                                EFI_HANDLE.\r
+  @retval EFI_INVALID_PARAMETER Language is NULL.\r
+  @retval EFI_INVALID_PARAMETER ControllerName is NULL.\r
+  @retval EFI_UNSUPPORTED       The driver specified by This is not currently\r
+                                managing the controller specified by\r
+                                ControllerHandle and ChildHandle.\r
+  @retval EFI_UNSUPPORTED       The driver specified by This does not support\r
+                                the language specified by Language.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+UsbKeyboardComponentNameGetControllerName (\r
+  IN  EFI_COMPONENT_NAME_PROTOCOL                     *This,\r
+  IN  EFI_HANDLE                                      ControllerHandle,\r
+  IN  EFI_HANDLE                                      ChildHandle        OPTIONAL,\r
+  IN  CHAR8                                           *Language,\r
+  OUT CHAR16                                          **ControllerName\r
+  );\r
+\r
 //\r
 // Functions of Simple Text Input Protocol\r
 //\r
 /**\r
-  Reset USB Keyboard.\r
+  Reset the input device and optionaly run diagnostics\r
 \r
   There are 2 types of reset for USB keyboard.\r
   For non-exhaustive reset, only keyboard buffer is cleared.\r
   For exhaustive reset, in addition to clearance of keyboard buffer, the hardware status\r
   is also re-initialized.\r
 \r
-  @param  This                  The protocol instance of EFI_SIMPLE_TEXT_INPUT_PROTOCOL.\r
-  @param  ExtendedVerification  Indicates if exhaustive reset is used.\r
-                                TRUE for exhaustive reset.\r
-                                FALSE for non-exhaustive reset.\r
+  @param  This                 Protocol instance pointer.\r
+  @param  ExtendedVerification Driver may perform diagnostics on reset.\r
 \r
-  @retval EFI_SUCCESS           Keyboard is reset successfully.\r
-  @retval EFI_DEVICE_ERROR      Failed to reset keyboard.\r
+  @retval EFI_SUCCESS          The device was reset.\r
+  @retval EFI_DEVICE_ERROR     The device is not functioning properly and could not be reset.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -284,14 +394,16 @@ USBKeyboardReset (
   );\r
 \r
 /**\r
-  Implements EFI_SIMPLE_TEXT_INPUT_PROTOCOL.ReadKeyStroke() function.\r
+  Reads the next keystroke from the input device.\r
 \r
   @param  This                 The EFI_SIMPLE_TEXT_INPUT_PROTOCOL instance.\r
   @param  Key                  A pointer to a buffer that is filled in with the keystroke\r
                                information for the key that was pressed.\r
 \r
-  @retval EFI_SUCCESS          Read key stroke successfully.\r
-  @retval Other                Read key stroke failed.\r
+  @retval EFI_SUCCESS          The keystroke information was returned.\r
+  @retval EFI_NOT_READY        There was no keystroke data availiable.\r
+  @retval EFI_DEVICE_ERROR     The keydtroke information was not returned due to\r
+                               hardware errors.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -305,14 +417,25 @@ USBKeyboardReadKeyStroke (
 // Simple Text Input Ex protocol functions\r
 //\r
 /**\r
-  The extension routine to reset the input device.\r
+  Resets the input device hardware.\r
 \r
-  @param This                     Protocol instance pointer.\r
-  @param ExtendedVerification     Driver may perform diagnostics on reset.\r
+  The Reset() function resets the input device hardware. As part\r
+  of initialization process, the firmware/device will make a quick\r
+  but reasonable attempt to verify that the device is functioning.\r
+  If the ExtendedVerification flag is TRUE the firmware may take\r
+  an extended amount of time to verify the device is operating on\r
+  reset. Otherwise the reset operation is to occur as quickly as\r
+  possible. The hardware verification process is not defined by\r
+  this specification and is left up to the platform firmware or\r
+  driver to implement.\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
+  @param This                 A pointer to the EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL instance.\r
+\r
+  @param ExtendedVerification Indicates that the driver may perform a more exhaustive\r
+                              verification operation of the device during reset.\r
+\r
+  @retval EFI_SUCCESS         The device was reset.\r
+  @retval EFI_DEVICE_ERROR    The device is not functioning correctly and could not be reset.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -323,16 +446,17 @@ USBKeyboardResetEx (
   );\r
 \r
 /**\r
-  Reads the next keystroke from the input device. The WaitForKey Event can\r
-  be used to test for existance of a keystroke via WaitForEvent () call.\r
+  Reads the next keystroke from the input device.\r
 \r
-  @param  This                    Protocol instance pointer.\r
-  @param  KeyData                 A pointer to a buffer that is filled in with the keystroke\r
-                                  state data for the key that was pressed.\r
+  @param  This                   Protocol instance pointer.\r
+  @param  KeyData                A pointer to a buffer that is filled in with the keystroke\r
+                                 state data for the key that was pressed.\r
 \r
-  @return EFI_SUCCESS             The keystroke information was returned successfully.\r
-  @retval EFI_INVALID_PARAMETER   KeyData is NULL.\r
-  @retval Other                   Read key stroke information failed.\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 to\r
+                                 hardware errors.\r
+  @retval EFI_INVALID_PARAMETER  KeyData is NULL.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -349,8 +473,10 @@ USBKeyboardReadKeyStrokeEx (
   @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_UNSUPPORTED         The device does not have the ability to set its state.\r
+  @retval EFI_SUCCESS             The device state was set appropriately.\r
+  @retval EFI_DEVICE_ERROR        The device is not functioning correctly and could\r
+                                  not have the setting adjusted.\r
+  @retval EFI_UNSUPPORTED         The device does not support the ability to have its state set.\r
   @retval EFI_INVALID_PARAMETER   KeyToggleState is NULL.\r
 \r
 **/\r
@@ -373,7 +499,7 @@ USBKeyboardSetState (
 \r
   @retval EFI_SUCCESS                 The notification function was registered successfully.\r
   @retval EFI_OUT_OF_RESOURCES        Unable to allocate resources for necesssary data structures.\r
-  @retval EFI_INVALID_PARAMETER       KeyData or NotifyHandle is NULL.\r
+  @retval EFI_INVALID_PARAMETER       KeyData or NotifyHandle or KeyNotificationFunction is NULL.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -392,9 +518,8 @@ USBKeyboardRegisterKeyNotify (
   @param  NotificationHandle        The handle of the notification function being unregistered.\r
 \r
   @retval EFI_SUCCESS              The notification function was unregistered successfully.\r
-  @retval EFI_INVALID_PARAMETER    The NotificationHandle is invalid or opening gSimpleTextInExNotifyGuid\r
-                                   on NotificationHandle fails.\r
-  @retval EFI_NOT_FOUND            Can not find the matching entry in database.\r
+  @retval EFI_INVALID_PARAMETER    The NotificationHandle is invalid\r
+  @retval EFI_NOT_FOUND            Cannot find the matching entry in database.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -405,7 +530,8 @@ USBKeyboardUnregisterKeyNotify (
   );\r
 \r
 /**\r
-  Handler function for WaitForKey event.\r
+  Event notification function registered for EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL.WaitForKeyEx\r
+  and EFI_SIMPLE_TEXT_INPUT_PROTOCOL.WaitForKey.\r
 \r
   @param  Event        Event to be signaled when a key is pressed.\r
   @param  Context      Points to USB_KB_DEV instance.\r
@@ -421,20 +547,20 @@ USBKeyboardWaitForKey (
 /**\r
   Free keyboard notify list.\r
 \r
-  @param  ListHead                The list head.\r
+  @param  NotifyList              The keyboard notify list to free.\r
 \r
   @retval EFI_SUCCESS             Free the notify list successfully.\r
-  @retval EFI_INVALID_PARAMETER   ListHead is invalid.\r
+  @retval EFI_INVALID_PARAMETER   NotifyList is NULL.\r
 \r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
 KbdFreeNotifyList (\r
-  IN OUT LIST_ENTRY           *ListHead\r
+  IN OUT LIST_ENTRY           *NotifyList\r
   );\r
 \r
 /**\r
-  Check whether there is key pending.\r
+  Check whether there is key pending in the keyboard buffer.\r
 \r
   @param  UsbKeyboardDevice    The USB_KB_DEV instance.\r
 \r
@@ -445,19 +571,17 @@ KbdFreeNotifyList (
 EFI_STATUS\r
 EFIAPI\r
 USBKeyboardCheckForKey (\r
-  IN  USB_KB_DEV    *UsbKeyboardDevice\r
+  IN OUT  USB_KB_DEV    *UsbKeyboardDevice\r
   );\r
 \r
 /**\r
-  Whether the pressed key matches a registered key or not.\r
+  Check whether the pressed key matches a registered key or not.\r
 \r
-  @param  RegsiteredData    A pointer to a buffer that is filled in with the keystroke\r
-                            state data for the key that was registered.\r
-  @param  InputData         A pointer to a buffer that is filled in with the keystroke\r
-                            state data for the key that was pressed.\r
+  @param  RegsiteredData    A pointer to keystroke data for the key that was registered.\r
+  @param  InputData         A pointer to keystroke data for the key that was pressed.\r
 \r
   @retval TRUE              Key pressed matches a registered key.\r
-  @retval FLASE             Match failed.\r
+  @retval FLASE             Key pressed does not matche a registered key.\r
 \r
 **/\r
 BOOLEAN\r