From 28fda21c85d476defbf36a866e2d45729f790eba Mon Sep 17 00:00:00 2001 From: Jan Janssen Date: Mon, 29 Aug 2022 10:43:27 +0200 Subject: [PATCH] boot: Use proper scan codes This arg expects scan codes and it can be very confusing to find a key conflict when trying to add a F3 button when there are no F3 keycodes seemingly in use. CHAR_CARRIAGE_RETURN and SCAN_F3 use the same value, so no changes in behavior. --- src/boot/efi/boot.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/boot/efi/boot.c b/src/boot/efi/boot.c index c41d40281c4..ac08650c292 100644 --- a/src/boot/efi/boot.c +++ b/src/boot/efi/boot.c @@ -318,8 +318,8 @@ static bool line_edit( case KEYPRESS(0, 0, CHAR_LINEFEED): case KEYPRESS(0, 0, CHAR_CARRIAGE_RETURN): - case KEYPRESS(0, CHAR_CARRIAGE_RETURN, 0): /* EZpad Mini 4s firmware sends malformed events */ - case KEYPRESS(0, CHAR_CARRIAGE_RETURN, CHAR_CARRIAGE_RETURN): /* Teclast X98+ II firmware sends malformed events */ + case KEYPRESS(0, SCAN_F3, 0): /* EZpad Mini 4s firmware sends malformed events */ + case KEYPRESS(0, SCAN_F3, CHAR_CARRIAGE_RETURN): /* Teclast X98+ II firmware sends malformed events */ if (!streq16(line, *line_in)) { free(*line_in); *line_in = TAKE_PTR(line); @@ -869,8 +869,8 @@ static bool menu_run( case KEYPRESS(0, 0, CHAR_LINEFEED): case KEYPRESS(0, 0, CHAR_CARRIAGE_RETURN): - case KEYPRESS(0, CHAR_CARRIAGE_RETURN, 0): /* EZpad Mini 4s firmware sends malformed events */ - case KEYPRESS(0, CHAR_CARRIAGE_RETURN, CHAR_CARRIAGE_RETURN): /* Teclast X98+ II firmware sends malformed events */ + case KEYPRESS(0, SCAN_F3, 0): /* EZpad Mini 4s firmware sends malformed events */ + case KEYPRESS(0, SCAN_F3, CHAR_CARRIAGE_RETURN): /* Teclast X98+ II firmware sends malformed events */ case KEYPRESS(0, SCAN_RIGHT, 0): exit = true; break; -- 2.47.3