diff options
author | Gaurav Pandya <gaurav.pandya@amd.com> | 2023-09-20 20:37:49 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2024-06-26 16:21:24 +0000 |
commit | ae09721a65ab3294439f6fa233adaf3b897f702f (patch) | |
tree | 7c075cb884d703a6b5ce44bb1a697c130029dcfc | |
parent | 89377ece8f1c7243d25fd84488dcd03e37b9e661 (diff) | |
download | edk2-ae09721a65ab3294439f6fa233adaf3b897f702f.tar.gz |
MdeModulePkg/DisplayEngineDxe: Support "^" and "V" key on pop-up form
BZ #4790
Support "^" and "V" key stokes on the pop-up form. Align the
implementation with key support on the regular HII form.
Signed-off-by: Gaurav Pandya <gaurav.pandya@amd.com>
-rw-r--r-- | MdeModulePkg/Universal/DisplayEngineDxe/InputHandler.c | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/MdeModulePkg/Universal/DisplayEngineDxe/InputHandler.c b/MdeModulePkg/Universal/DisplayEngineDxe/InputHandler.c index f70feeb55f..b6dc23476a 100644 --- a/MdeModulePkg/Universal/DisplayEngineDxe/InputHandler.c +++ b/MdeModulePkg/Universal/DisplayEngineDxe/InputHandler.c @@ -2,6 +2,7 @@ Implementation for handling user input from the User Interfaces.
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
+Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@@ -1568,6 +1569,47 @@ TheKey: break;
+ case '^':
+ if ((TopOptionIndex > 0) && (TopOptionIndex == HighlightOptionIndex)) {
+ //
+ // Highlight reaches the top of the popup window, scroll one menu item.
+ //
+ TopOptionIndex--;
+ ShowDownArrow = TRUE;
+ }
+
+ if (TopOptionIndex == 0) {
+ ShowUpArrow = FALSE;
+ }
+
+ if (HighlightOptionIndex > 0) {
+ HighlightOptionIndex--;
+ }
+
+ break;
+
+ case 'V':
+ case 'v':
+ if (((TopOptionIndex + MenuLinesInView) < PopUpMenuLines) &&
+ (HighlightOptionIndex == (TopOptionIndex + MenuLinesInView - 1)))
+ {
+ //
+ // Highlight reaches the bottom of the popup window, scroll one menu item.
+ //
+ TopOptionIndex++;
+ ShowUpArrow = TRUE;
+ }
+
+ if ((TopOptionIndex + MenuLinesInView) == PopUpMenuLines) {
+ ShowDownArrow = FALSE;
+ }
+
+ if (HighlightOptionIndex < (PopUpMenuLines - 1)) {
+ HighlightOptionIndex++;
+ }
+
+ break;
+
case CHAR_NULL:
switch (Key.ScanCode) {
case SCAN_UP:
|