From ae09721a65ab3294439f6fa233adaf3b897f702f Mon Sep 17 00:00:00 2001 From: Gaurav Pandya Date: Wed, 20 Sep 2023 20:37:49 +0800 Subject: 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 --- .../Universal/DisplayEngineDxe/InputHandler.c | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) 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.
+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: -- cgit