/* Return the count of scancode in the queue. */
UINTN GetScancodeBufCount(IN SCAN_CODE_QUEUE *Queue)
/* Return the count of scancode in the queue. */
UINTN GetScancodeBufCount(IN SCAN_CODE_QUEUE *Queue)
{
  if (Queue->Head <= Queue->Tail) {
    return Queue->Tail - Queue->Head;
  } else {
    return Queue->Tail + KEYBOARD_SCAN_CODE_MAX_COUNT - Queue->Head;
  }
}