]> git.ipfire.org Git - thirdparty/grub.git/commit
efi/console: Fix the "enter" key not working on x86 tablets
authorHans de Goede <hdegoede@redhat.com>
Tue, 26 Jun 2018 18:15:01 +0000 (20:15 +0200)
committerDaniel Kiper <daniel.kiper@oracle.com>
Wed, 11 Jul 2018 09:53:28 +0000 (11:53 +0200)
commitedece25a77cf5f357b0912aaaf089034752a7288
tree5b023fd256d590626840cc4e8a9ecad173c17d42
parent4e9d9358e0cda6d01020005eb6343e3b69f7201a
efi/console: Fix the "enter" key not working on x86 tablets

Most 8" or 7" x86 Windows 10 tablets come with volume up/down buttons and
a power-button. In their UEFI these are almost always mapped to arrow
up/down and enter.

Pressing the volume buttons (sometimes by accident) will stop the
menu countdown, but the power-button / "enter" key was not being recognized
as enter, so the user would be stuck at the grub menu.

The problem is that these tablets send scan_code 13 or 0x0d for the
power-button, which officialy maps to the F3 key. They also set
unicode_char to 0x0d.

This commit recognizes the special case of both scan_code and unicode_char
being set to 0x0d and treats this as an enter key press.

This fixes things getting stuck at the grub-menu and allows the user
to choice a grub-menu entry using the buttons on the tablet.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/term/efi/console.c