Don't set unicode_char if scan_code is set. Without this correction navigation in the iPXE menu is not possible.
Add support for page up, page down, and insert. Signed-off-by: Heinrich Schuchardt <xypron.g...@gmx.de> --- lib/efi_loader/efi_console.c | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/lib/efi_loader/efi_console.c b/lib/efi_loader/efi_console.c index d35893dc2a..b5704fbf0f 100644 --- a/lib/efi_loader/efi_console.c +++ b/lib/efi_loader/efi_console.c @@ -411,14 +411,30 @@ static efi_status_t EFIAPI efi_cin_read_key_stroke( pressed_key.scan_code = getc() - '0' + 11; getc(); break; - case '2': /* F9 - F12 */ - pressed_key.scan_code = getc() - '0' + 19; - getc(); + case '2': + ch = getc(); + switch (ch) { + case '~': /* INS */ + pressed_key.scan_code = 7; + break; + case '1'...'4': /* F9 - F12 */ + pressed_key.scan_code = ch - '0' + 19; + getc(); + break; + } break; case '3': /* DEL */ pressed_key.scan_code = 8; getc(); break; + case '5': /* PG UP */ + pressed_key.scan_code = 9; + getc(); + break; + case '6': /* PG DOWN */ + pressed_key.scan_code = 10; + getc(); + break; } break; } @@ -426,7 +442,8 @@ static efi_status_t EFIAPI efi_cin_read_key_stroke( /* Backspace */ ch = 0x08; } - pressed_key.unicode_char = ch; + if (!pressed_key.scan_code) + pressed_key.unicode_char = ch; *key = pressed_key; return EFI_EXIT(EFI_SUCCESS); -- 2.14.2 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot