/* This function is the handler for Repeat Key event triggered by timer. After a repeatable key is pressed, the event would be triggered with interval of USBKBD_REPEAT_DELAY. Once the event is triggered, following trigger will come with interval of USBKBD_REPEAT_RATE. */
VOID EFIAPI USBKeyboardRepeatHandler(IN EFI_EVENT Event, IN VOID *Context)
/* This function is the handler for Repeat Key event triggered by timer. After a repeatable key is pressed, the event would be triggered with interval of USBKBD_REPEAT_DELAY. Once the event is triggered, following trigger will come with interval of USBKBD_REPEAT_RATE. */
VOID EFIAPI USBKeyboardRepeatHandler(IN EFI_EVENT Event, IN VOID *Context)
{
  USB_KB_DEV  *UsbKeyboardDevice;
  USB_KEY     UsbKey;
  UsbKeyboardDevice = (USB_KB_DEV *)Context;
  if (UsbKeyboardDevice->RepeatKey != 0) {
    UsbKey.KeyCode = UsbKeyboardDevice->RepeatKey;
    UsbKey.Down    = TRUE;
    Enqueue (&UsbKeyboardDevice->UsbKeyQueue, &UsbKey, sizeof (UsbKey));
    gBS->SetTimer (
           UsbKeyboardDevice->RepeatTimer,
           TimerRelative,
           USBKBD_REPEAT_RATE
           );
  }
}