grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] at_keyboard: Fix keyboards that report IBM PC AT scan codes


From: Javier Martinez Canillas
Subject: [PATCH] at_keyboard: Fix keyboards that report IBM PC AT scan codes
Date: Fri, 6 Nov 2020 14:48:16 +0100

GRUB has support for both the IBM PC XT (Set 1) and IBM PC AT (Set 2) key
scan code mappings. But the driver always hardcodes to Set 1, overwriting
the mode that was queried in the grub_keyboard_controller_init() function.

This breaks keyboard mapping on machines whose firmwares are not using the
Set 1. For example, this is the case in Lenovo P71 and HP Elitebook 8770W
laptops that report key scan codes using Set 2.

Instead of hardcoding to Set 1, use the value that was queried before.

Reported-by: Renaud M├ętrich <rmetrich@redhat.com>
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
---

 grub-core/term/at_keyboard.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/grub-core/term/at_keyboard.c b/grub-core/term/at_keyboard.c
index 597111077bd..ed2ea0904c1 100644
--- a/grub-core/term/at_keyboard.c
+++ b/grub-core/term/at_keyboard.c
@@ -165,7 +165,7 @@ set_scancodes (void)
     }
 
 #if !USE_SCANCODE_SET
-  ps2_state.current_set = 1;
+  ps2_state.current_set = grub_keyboard_orig_set;
   return;
 #else
 
-- 
2.28.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]