]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c
MdeModulePkg/Terminal: ReadKeyStrokeEx always return key state
[mirror_edk2.git] / MdeModulePkg / Universal / Console / TerminalDxe / TerminalConIn.c
index 3c1102dac4a1e6db323d15a49f1f67f0db013514..99316376cb062d456fe3a0388bb6efa1f99ca5dc 100644 (file)
@@ -2,7 +2,7 @@
   Implementation for EFI_SIMPLE_TEXT_INPUT_PROTOCOL protocol.\r
 \r
 (C) Copyright 2014 Hewlett-Packard Development Company, L.P.<BR>\r
-Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
 Copyright (C) 2016 Silicon Graphics, Inc. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
@@ -41,13 +41,12 @@ ReadKeyStrokeWorker (
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
-  if (!EfiKeyFiFoRemoveOneKey (TerminalDevice, &KeyData->Key)) {\r
-    return EFI_NOT_READY;\r
-  }\r
-\r
   KeyData->KeyState.KeyShiftState  = 0;\r
   KeyData->KeyState.KeyToggleState = 0;\r
 \r
+  if (!EfiKeyFiFoRemoveOneKey (TerminalDevice, &KeyData->Key)) {\r
+    return EFI_NOT_READY;\r
+  }\r
 \r
   return EFI_SUCCESS;\r
 \r