aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--stand/efi/libefi/efi_console.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/stand/efi/libefi/efi_console.c b/stand/efi/libefi/efi_console.c
index 1b73934336e9..1b096a963555 100644
--- a/stand/efi/libefi/efi_console.c
+++ b/stand/efi/libefi/efi_console.c
@@ -1126,11 +1126,15 @@ efi_readkey_ex(void)
kp->UnicodeChar++;
}
}
- if (kp->ScanCode == 0 && kp->UnicodeChar == 0)
- return (false);
- keybuf_inschar(kp);
- return (true);
}
+ /*
+ * The shift state and/or toggle state may not be valid,
+ * but we still can have ScanCode or UnicodeChar.
+ */
+ if (kp->ScanCode == 0 && kp->UnicodeChar == 0)
+ return (false);
+ keybuf_inschar(kp);
+ return (true);
}
return (false);
}