mirror of https://github.com/acidanthera/audk.git
EmulatorPkg/Win: ReadKeyStrokeEx() always returns correct KeyState
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1118 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com> Cc: Andrew Fish <afish@apple.com>
This commit is contained in:
parent
d773459e2f
commit
e3c96c391c
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue