]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EmulatorPkg/EmuGopDxe/GopInput.c
ArmVirtPkg: add "Contributions.txt" and "License.txt"
[mirror_edk2.git] / EmulatorPkg / EmuGopDxe / GopInput.c
index 571776b194f25dc2e9e8dd1c0e8bbc7ca79f1cce..a1f636aaa28250bb93ff8e599a0527542f202620 100644 (file)
@@ -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
@@ -293,10 +300,6 @@ EmuGopSimpleTextInExResetEx (
 
 **/
 {
-  GOP_PRIVATE_DATA *Private;
-
-  Private = GOP_PRIVATE_DATA_FROM_TEXT_IN_EX_THIS (This);
-
   return EFI_SUCCESS;
 }