0010-keylayouts-don-t-print-Unknown-key-message.patch 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. From 4e89b0da7213b710bfb4d95a20e34b193f39e58c Mon Sep 17 00:00:00 2001
  2. From: Leah Rowe <leah@libreboot.org>
  3. Date: Tue, 31 Oct 2023 10:33:28 +0000
  4. Subject: [PATCH 10/14] keylayouts: don't print "Unknown key" message
  5. on keyboards with stuck keys, this results in GRUB just
  6. spewing it repeatedly, preventing use of GRUB.
  7. in such cases, it's still possible to use the keyboard,
  8. and we should let the user at least boot.
  9. it often appears when people plug in faulty usb keyboards,
  10. but can appear for laptop keyboards too; one of my e6400
  11. has stuck keys.
  12. with this patch, grub should be a bit more reliable in
  13. terms of user experience, when the keyboard is faulty.
  14. Signed-off-by: Leah Rowe <leah@libreboot.org>
  15. ---
  16. grub-core/commands/keylayouts.c | 1 -
  17. 1 file changed, 1 deletion(-)
  18. diff --git a/grub-core/commands/keylayouts.c b/grub-core/commands/keylayouts.c
  19. index aa3ba34f2..445fa0601 100644
  20. --- a/grub-core/commands/keylayouts.c
  21. +++ b/grub-core/commands/keylayouts.c
  22. @@ -174,7 +174,6 @@ grub_term_map_key (grub_keyboard_key_t code, int status)
  23. key = map_key_core (code, status, &alt_gr_consumed);
  24. if (key == 0 || key == GRUB_TERM_SHIFT) {
  25. - grub_printf ("Unknown key 0x%x detected\n", code);
  26. return GRUB_TERM_NO_KEY;
  27. }
  28. --
  29. 2.39.2