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>
This commit is contained in:
Gaurav Pandya 2023-09-20 20:37:49 +08:00 committed by mergify[bot]
parent 89377ece8f
commit ae09721a65

View File

@ -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: