REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1118

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ruiyu Ni <[email protected]>
Cc: Hao Wu <[email protected]>
Cc: Andrew Fish <[email protected]>
---
 EmulatorPkg/Win/Host/WinGopInput.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/EmulatorPkg/Win/Host/WinGopInput.c 
b/EmulatorPkg/Win/Host/WinGopInput.c
index 6c218ab98a..17d35bb52c 100644
--- a/EmulatorPkg/Win/Host/WinGopInput.c
+++ b/EmulatorPkg/Win/Host/WinGopInput.c
@@ -363,6 +363,23 @@ WinNtWndKeySetState (
   GRAPHICS_PRIVATE_DATA           *Private;
 
   Private = GRAPHICS_PRIVATE_DATA_FROM_THIS (GraphicsIo);
+  Private->ScrollLock = FALSE;
+  Private->NumLock = FALSE;
+  Private->CapsLock = FALSE;
+  Private->IsPartialKeySupport = FALSE;
+
+  if ((*KeyToggleState & EFI_SCROLL_LOCK_ACTIVE) == EFI_SCROLL_LOCK_ACTIVE) {
+    Private->ScrollLock = TRUE;
+  }
+  if ((*KeyToggleState & EFI_NUM_LOCK_ACTIVE) == EFI_NUM_LOCK_ACTIVE) {
+    Private->NumLock = TRUE;
+  }
+  if ((*KeyToggleState & EFI_CAPS_LOCK_ACTIVE) == EFI_CAPS_LOCK_ACTIVE) {
+    Private->CapsLock = TRUE;
+  }
+  if ((*KeyToggleState & EFI_KEY_STATE_EXPOSED) == EFI_KEY_STATE_EXPOSED) {
+    Private->IsPartialKeySupport = TRUE;
+  }
   Private->KeyState.KeyToggleState = *KeyToggleState;
   return EFI_SUCCESS;
 }
-- 
2.16.1.windows.1

_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to