summaryrefslogtreecommitdiff
path: root/EmulatorPkg/EmuGopDxe/GopInput.c
diff options
context:
space:
mode:
Diffstat (limited to 'EmulatorPkg/EmuGopDxe/GopInput.c')
-rw-r--r--EmulatorPkg/EmuGopDxe/GopInput.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/EmulatorPkg/EmuGopDxe/GopInput.c b/EmulatorPkg/EmuGopDxe/GopInput.c
index 571776b194..288a151d6d 100644
--- a/EmulatorPkg/EmuGopDxe/GopInput.c
+++ b/EmulatorPkg/EmuGopDxe/GopInput.c
@@ -189,7 +189,14 @@ EmuGopSimpleTextInReadKeyStroke (
OldTpl = gBS->RaiseTPL (TPL_NOTIFY);
Status = Private->EmuGraphicsWindow->GetKey (Private->EmuGraphicsWindow, &KeyData);
- CopyMem (Key, &KeyData.Key, sizeof (EFI_INPUT_KEY));
+ if (!EFI_ERROR (Status)) {
+ if ((KeyData.Key.ScanCode == 0) && (KeyData.Key.UnicodeChar == 0)) {
+ // Modifier key was pressed
+ Status = EFI_NOT_READY;
+ } else {
+ CopyMem (Key, &KeyData.Key, sizeof (EFI_INPUT_KEY));
+ }
+ }
//
// Leave critical section and return