|
|
b1bcb2 |
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
b1bcb2 |
From: Javier Martinez Canillas <javierm@redhat.com>
|
|
|
b1bcb2 |
Date: Fri, 6 Nov 2020 14:14:24 +0100
|
|
|
b1bcb2 |
Subject: [PATCH] at_keyboard: Fix keyboards that report IBM PC AT scan codes
|
|
|
b1bcb2 |
MIME-Version: 1.0
|
|
|
b1bcb2 |
Content-Type: text/plain; charset=UTF-8
|
|
|
b1bcb2 |
Content-Transfer-Encoding: 8bit
|
|
|
b1bcb2 |
|
|
|
b1bcb2 |
GRUB has support for both the IBM PC XT (Set 1) and IBM PC AT (Set 2) key
|
|
|
b1bcb2 |
scan code mappings. But the driver always hardcodes to Set 1, overwriting
|
|
|
b1bcb2 |
the mode that was queried in the grub_keyboard_controller_init() function.
|
|
|
b1bcb2 |
|
|
|
b1bcb2 |
This breaks keyboard mapping on machines whose firmwares are not using the
|
|
|
b1bcb2 |
Set 1. For example, this is the case in Lenovo P71 and HP Elitebook 8770W
|
|
|
b1bcb2 |
laptops that report key scan codes using Set 2.
|
|
|
b1bcb2 |
|
|
|
b1bcb2 |
Instead of hardcoding to Set 1, use the value that was queried before.
|
|
|
b1bcb2 |
|
|
|
b1bcb2 |
Reported-by: Renaud Métrich <rmetrich@redhat.com>
|
|
|
b1bcb2 |
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
|
|
|
b1bcb2 |
---
|
|
|
b1bcb2 |
grub-core/term/at_keyboard.c | 2 +-
|
|
|
b1bcb2 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
b1bcb2 |
|
|
|
b1bcb2 |
diff --git a/grub-core/term/at_keyboard.c b/grub-core/term/at_keyboard.c
|
|
|
b1bcb2 |
index b4257e84a04..cbec595d166 100644
|
|
|
b1bcb2 |
--- a/grub-core/term/at_keyboard.c
|
|
|
b1bcb2 |
+++ b/grub-core/term/at_keyboard.c
|
|
|
b1bcb2 |
@@ -355,7 +355,7 @@ set_scancodes (void)
|
|
|
b1bcb2 |
}
|
|
|
b1bcb2 |
|
|
|
b1bcb2 |
#if !USE_SCANCODE_SET
|
|
|
b1bcb2 |
- current_set = 1;
|
|
|
b1bcb2 |
+ current_set = grub_keyboard_orig_set;
|
|
|
b1bcb2 |
return;
|
|
|
b1bcb2 |
#else
|
|
|
b1bcb2 |
|