Skip to content

Commit ae09721

Browse files
gapandyamergify[bot]
authored andcommitted
MdeModulePkg/DisplayEngineDxe: Support "^" and "V" key on pop-up form
BZ tianocore#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 <[email protected]>
1 parent 89377ec commit ae09721

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

MdeModulePkg/Universal/DisplayEngineDxe/InputHandler.c

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Implementation for handling user input from the User Interfaces.
33
44
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
5+
Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved.
56
SPDX-License-Identifier: BSD-2-Clause-Patent
67
78
**/
@@ -1568,6 +1569,47 @@ GetSelectionInputPopUp (
15681569

15691570
break;
15701571

1572+
case '^':
1573+
if ((TopOptionIndex > 0) && (TopOptionIndex == HighlightOptionIndex)) {
1574+
//
1575+
// Highlight reaches the top of the popup window, scroll one menu item.
1576+
//
1577+
TopOptionIndex--;
1578+
ShowDownArrow = TRUE;
1579+
}
1580+
1581+
if (TopOptionIndex == 0) {
1582+
ShowUpArrow = FALSE;
1583+
}
1584+
1585+
if (HighlightOptionIndex > 0) {
1586+
HighlightOptionIndex--;
1587+
}
1588+
1589+
break;
1590+
1591+
case 'V':
1592+
case 'v':
1593+
if (((TopOptionIndex + MenuLinesInView) < PopUpMenuLines) &&
1594+
(HighlightOptionIndex == (TopOptionIndex + MenuLinesInView - 1)))
1595+
{
1596+
//
1597+
// Highlight reaches the bottom of the popup window, scroll one menu item.
1598+
//
1599+
TopOptionIndex++;
1600+
ShowUpArrow = TRUE;
1601+
}
1602+
1603+
if ((TopOptionIndex + MenuLinesInView) == PopUpMenuLines) {
1604+
ShowDownArrow = FALSE;
1605+
}
1606+
1607+
if (HighlightOptionIndex < (PopUpMenuLines - 1)) {
1608+
HighlightOptionIndex++;
1609+
}
1610+
1611+
break;
1612+
15711613
case CHAR_NULL:
15721614
switch (Key.ScanCode) {
15731615
case SCAN_UP:

0 commit comments

Comments
 (0)