]> git.ipfire.org Git - thirdparty/systemd.git/commit
sd-boot: Work around malformed CR key code
authorPaul Cercueil <paul@crapouillou.net>
Sun, 14 Jun 2020 10:51:36 +0000 (12:51 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 15 Jun 2020 06:05:57 +0000 (08:05 +0200)
commit6fe95d302086e8a89b1bc6d443e0e2c3e0b0f136
tree5027afd3da13f66e9848aaeaa926948323b4f315
parent7daaf56761bd7fe4874215560db8184808541581
sd-boot: Work around malformed CR key code

When a key is pressed, the EFI firmware gives us a 64-bit word that
contains the modifier key code in the upper 32 bits, the scan code in
the middle 16 bits, and a unicode character in the low 16 bits.

Some bogus EFI firmwares will put the unicode character in the scan code
area, for instance on the EZpad mini 4s tablet.

Others will even put the unicode character in both the scan code and
unicode areas. This is the case for instance on the Teclast X98+ II
tablet.

Add workarounds for these corner cases, only for the carriage return key
right now. Some more workarounds may be needed, e.g. for volume keys,
but I cannot test it.

Partially fixes #8466.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
src/boot/efi/boot.c