[USETUP] InstallDirectoryPage(): Pressing ESC erases the whole path line (#7185)

This commit is contained in:
Hermès Bélusca-Maïto 2024-07-25 21:30:50 +02:00
parent 4956e249db
commit 2136409fda
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0

View file

@ -3043,6 +3043,14 @@ InstallDirectoryPage(PINPUT_RECORD Ir)
CONSOLE_SetCursorXY(8 + Pos, 11);
}
}
else if (Ir->Event.KeyEvent.wVirtualKeyCode == VK_ESCAPE) /* ESC */
{
/* Erase the whole line */
*InstallDir = UNICODE_NULL;
Pos = Length = 0;
CONSOLE_SetInputTextXY(8, 11, 51, InstallDir);
CONSOLE_SetCursorXY(8 + Pos, 11);
}
else if (Ir->Event.KeyEvent.uChar.AsciiChar == 0x0D) /* ENTER */
{
CONSOLE_SetCursorType(TRUE, FALSE);