From b686f4600792c504f01929f761be473e298de33d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20=C5=BBygowski?= Date: Sat, 28 Jun 2025 07:49:13 +0200 Subject: sercon: Fix keycodes for F11 and F12 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix what happens when F11/F12 is sent via serial port. The existing code already correctly detects the byte sequence that is sent on the serial connection, however it translates it to the incorrect keycode. The termseq table must map to *DOS scan codes*. The incorrect value matches *PS2 set1 scan codes* for F11 and F12, so fix the implementation mistake. The patch is tested by Andrei on real hardware. Signed-off-by: Michał Żygowski Cc: Andrei Purdea [Add and message description by Andrei Purdea ] Link: https://mail.coreboot.org/archives/list/seabios@seabios.org/thread/V2KN2YKCL5J2JL4IMJKVTVE6YALIIC73/ Link: https://github.com/Dasharo/SeaBIOS/commit/0f4530859f11b3235b7d6163388f19577bdc6e1e Fixes: d6728f30 ("add serial console support") Signed-off-by: Paul Menzel --- src/sercon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/sercon.c b/src/sercon.c index 3019d9b..cdc47ab 100644 --- a/src/sercon.c +++ b/src/sercon.c @@ -567,8 +567,8 @@ static VAR16 struct { { .seq = "[19~", .len = 4, .keycode = 0x4200 }, // F8 { .seq = "[20~", .len = 4, .keycode = 0x4300 }, // F9 { .seq = "[21~", .len = 4, .keycode = 0x4400 }, // F10 - { .seq = "[23~", .len = 4, .keycode = 0x5700 }, // F11 - { .seq = "[24~", .len = 4, .keycode = 0x5800 }, // F12 + { .seq = "[23~", .len = 4, .keycode = 0x8500 }, // F11 + { .seq = "[24~", .len = 4, .keycode = 0x8600 }, // F12 { .seq = "[2~", .len = 3, .keycode = 0x52e0 }, // insert { .seq = "[3~", .len = 3, .keycode = 0x53e0 }, // delete -- cgit v1.1