MdeModulePkg/ConSplitter: ReadKeyStrokeEx always return key state

Today's implementation only return key state when there is 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 20ddbc133f)
This commit is contained in:
Ruiyu Ni
2018-01-12 19:26:22 +08:00
parent a919bfcd28
commit 48aa7b264e
2 changed files with 151 additions and 25 deletions

View File

@ -1,7 +1,7 @@
/** @file
Private data structures for the Console Splitter driver
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
@ -129,6 +129,8 @@ typedef struct {
EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL **TextInExList;
UINTN TextInExListCount;
LIST_ENTRY NotifyList;
EFI_KEY_DATA *KeyQueue;
UINTN CurrentNumberOfKeys;
//
// It will be initialized and synced between console input devices
// for toggle state sync.