Clear input key buffer before read and propagate EFI_STATUS from ReadKeyStroke
All checks were successful
Builds / ExectOS (amd64, debug) (push) Successful in -59m21s
Builds / ExectOS (amd64, release) (push) Successful in -59m24s
Builds / ExectOS (i686, release) (push) Successful in -59m28s
Builds / ExectOS (i686, debug) (push) Successful in -59m25s

This commit is contained in:
2026-05-04 14:09:30 +02:00
parent 7a28cf1c0a
commit 48ef4bcdca
3 changed files with 9 additions and 4 deletions

View File

@@ -221,10 +221,15 @@ Console::QueryMode(OUT PUINT_PTR ResX,
* @since XT 1.0
*/
XTCDECL
VOID
EFI_STATUS
Console::ReadKeyStroke(OUT PEFI_INPUT_KEY Key)
{
XtLoader::GetEfiSystemTable()->ConIn->ReadKeyStroke(XtLoader::GetEfiSystemTable()->ConIn, Key);
/* Clear the key structure to prevent ghost keystrokes */
Key->ScanCode = 0;
Key->UnicodeChar = 0;
/* Read the keystroke from the EFI input console */
return XtLoader::GetEfiSystemTable()->ConIn->ReadKeyStroke(XtLoader::GetEfiSystemTable()->ConIn, Key);
}
/**