https://git.reactos.org/?p=reactos.git;a=commitdiff;h=8b94515bd3378a39fdd57…
commit 8b94515bd3378a39fdd57b67fdf5458309c4f5f4
Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
AuthorDate: Sat Jan 2 19:34:22 2021 +0100
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Sun Jan 3 00:27:50 2021 +0100
[USETUP] Fix handling of the ESCAPE key.
Its AsciiChar is not zero in Console-compatible code.
---
base/setup/usetup/usetup.c | 27 ++++++++++++---------------
1 file changed, 12 insertions(+), 15 deletions(-)
diff --git a/base/setup/usetup/usetup.c b/base/setup/usetup/usetup.c
index e8de2666026..ea09d5dd9af 100644
--- a/base/setup/usetup/usetup.c
+++ b/base/setup/usetup/usetup.c
@@ -948,8 +948,7 @@ RepairIntroPage(PINPUT_RECORD Ir)
{
return RECOVERY_PAGE;
}
- else if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) &&
- (Ir->Event.KeyEvent.wVirtualKeyCode == VK_ESCAPE)) /* ESC */
+ else if (Ir->Event.KeyEvent.wVirtualKeyCode == VK_ESCAPE) /* ESC */
{
return WELCOME_PAGE;
}
@@ -1051,17 +1050,17 @@ UpgradeRepairPage(PINPUT_RECORD Ir)
RedrawGenericList(&ListUi);
break;
}
- case VK_ESCAPE: /* ESC */
- {
- RestoreGenericListUiState(&ListUi);
- // return nextPage; // prevPage;
-
- // return INSTALL_INTRO_PAGE;
- return DEVICE_SETTINGS_PAGE;
- // return SCSI_CONTROLLER_PAGE;
- }
}
}
+ else if (Ir->Event.KeyEvent.wVirtualKeyCode == VK_ESCAPE) /* ESC */
+ {
+ RestoreGenericListUiState(&ListUi);
+ // return nextPage; // prevPage;
+
+ // return INSTALL_INTRO_PAGE;
+ return DEVICE_SETTINGS_PAGE;
+ // return SCSI_CONTROLLER_PAGE;
+ }
else
{
// switch (toupper(Ir->Event.KeyEvent.uChar.AsciiChar))
@@ -1411,8 +1410,7 @@ HandleGenericList(PGENERIC_LIST_UI ListUi,
else
RedrawGenericList(ListUi);
}
- else if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) &&
- (Ir->Event.KeyEvent.wVirtualKeyCode == VK_ESCAPE)) /* ESC */
+ else if (Ir->Event.KeyEvent.wVirtualKeyCode == VK_ESCAPE) /* ESC */
{
RestoreGenericListUiState(ListUi);
return nextPage; // Use some "prevPage;" instead?
@@ -3279,8 +3277,7 @@ SelectFileSystemPage(PINPUT_RECORD Ir)
break;
}
- else if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) &&
- (Ir->Event.KeyEvent.wVirtualKeyCode == VK_ESCAPE)) /* ESC */
+ else if (Ir->Event.KeyEvent.wVirtualKeyCode == VK_ESCAPE) /* ESC */
{
/* Reset the formatter machine state */
TempPartition = NULL;