From: Daniel Kiper <dkiper@net-space.pl>
To: Leah Rowe <leah@libreboot.org>
Cc: grub-devel@gnu.org, pmenzel@molgen.mpg.de, phcoder@gmail.com
Subject: Re: PATCH: keylayouts: don't print "Unknown key" message
Date: Tue, 31 Oct 2023 14:14:31 +0100 [thread overview]
Message-ID: <20231031131431.nwphbi66yivhoase@tomti.i.net-space.pl> (raw)
In-Reply-To: <20231031111229.967365d9180a636afba02b72@libreboot.org>
Adding Paul and Vladimir...
Please send patches using git "send-email"...
On Tue, Oct 31, 2023 at 11:12:29AM +0000, Leah Rowe via Grub-devel wrote:
> The attached patch (see attached) removes the message e.g. "Unknown key
> 0xff".
>
> Faulty keyboards make GRUB unusable. Normally it happens
> when a user plugs in a faulty USB keyboard, but if it's
> the laptop keyboard, then GRUB becomes unusable and the
> user cannot boot anything.
>
> This has been observed when using GRUB as a coreboot payload.
>
> So, your laptop keyboard is a ticking timebomb if you use
> GRUB; with this patch, that's no longer the case.
>
> --
> Leah Rowe <leah@libreboot.org>
> >From 0a6abeb40ac4284fbff6ef5958989d561b6290a7 Mon Sep 17 00:00:00 2001
> From: Leah Rowe <leah@libreboot.org>
> Date: Tue, 31 Oct 2023 10:33:28 +0000
> Subject: [PATCH 1/1] keylayouts: don't print "Unknown key" message
>
> on keyboards with stuck keys, this results in GRUB just
> spewing it repeatedly, preventing use of GRUB.
>
> in such cases, it's still possible to use the keyboard,
> and we should let the user at least boot.
>
> it often appears when people plug in faulty usb keyboards,
> but can appear for laptop keyboards too; one of my e6400
> has stuck keys.
>
> with this patch, grub should be a bit more reliable in
> terms of user experience, when the keyboard is faulty.
>
> Signed-off-by: Leah Rowe <leah@libreboot.org>
> ---
> grub-core/commands/keylayouts.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/grub-core/commands/keylayouts.c b/grub-core/commands/keylayouts.c
> index aa3ba34f2..445fa0601 100644
> --- a/grub-core/commands/keylayouts.c
> +++ b/grub-core/commands/keylayouts.c
> @@ -174,7 +174,6 @@ grub_term_map_key (grub_keyboard_key_t code, int status)
> key = map_key_core (code, status, &alt_gr_consumed);
>
> if (key == 0 || key == GRUB_TERM_SHIFT) {
> - grub_printf ("Unknown key 0x%x detected\n", code);
I would convert this to grub_dprintf ("keyboard", ...
Daniel
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel
prev parent reply other threads:[~2023-10-31 13:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-31 11:12 PATCH: keylayouts: don't print "Unknown key" message Leah Rowe via Grub-devel
2023-10-31 13:14 ` Daniel Kiper [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231031131431.nwphbi66yivhoase@tomti.i.net-space.pl \
--to=dkiper@net-space.pl \
--cc=grub-devel@gnu.org \
--cc=leah@libreboot.org \
--cc=phcoder@gmail.com \
--cc=pmenzel@molgen.mpg.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).