IntelFrameworkModule/Ps2Kb: ReadKeyStrokeEx always return key state

Today's implementation only return key state when there is a key.
But when user doesn't press any key, the key state cannot be
returned.

The patch changes the ReadKeyStrokeEx() to always return the
key state even there is no key pressed.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
(cherry picked from commit 896ae6fc24)
This commit is contained in:
Ruiyu Ni
2018-01-19 15:22:53 +08:00
parent b2b7bff4db
commit 910e904d9c
3 changed files with 54 additions and 24 deletions

View File

@ -1,7 +1,7 @@
/** @file
PS/2 keyboard driver header file
Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@ -566,4 +566,16 @@ IsKeyRegistered (
IN EFI_KEY_DATA *InputData
);
/**
Initialize the key state.
@param ConsoleIn The KEYBOARD_CONSOLE_IN_DEV instance.
@param KeyState A pointer to receive the key state information.
**/
VOID
InitializeKeyState (
IN KEYBOARD_CONSOLE_IN_DEV *ConsoleIn,
OUT EFI_KEY_STATE *KeyState
);
#endif