Compare commits

..

2 Commits

Author SHA1 Message Date
Paul Cercueil 6fe95d3020 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>
2020-06-15 08:05:57 +02:00
AndreRH 7daaf56761 hwdb: Add accel orientation quirk for Odys Fusion Win 12 2in1 2020-06-15 07:56:44 +02:00
2 changed files with 10 additions and 0 deletions

View File

@ -533,6 +533,12 @@ sensor:modalias:acpi:KIOX000A*:dmi:*:svnTMAX:pnTM101W610L:*
sensor:modalias:acpi:BOSC0200*:dmi:*:svnNuvision:pnNES11:*
ACCEL_MOUNT_MATRIX=1, 0, 0; 0, -1, 0; 0, 0, 1
#########################################
# Odys
#########################################
sensor:modalias:acpi:BOSC0200*:dmi:bvnINSYDECorp.:bvrODYS.FUSIONWIN12:*
ACCEL_MOUNT_MATRIX=-1, 0, 0; 0, 1, 0; 0, 0, 1
#########################################
# Onda
#########################################

View File

@ -272,6 +272,8 @@ static BOOLEAN line_edit(
case KEYPRESS(0, 0, CHAR_LINEFEED):
case KEYPRESS(0, 0, CHAR_CARRIAGE_RETURN):
case KEYPRESS(0, CHAR_CARRIAGE_RETURN, 0):
case KEYPRESS(0, CHAR_CARRIAGE_RETURN, CHAR_CARRIAGE_RETURN):
if (StrCmp(line, line_in) != 0)
*line_out = TAKE_PTR(line);
enter = TRUE;
@ -742,6 +744,8 @@ static BOOLEAN menu_run(
case KEYPRESS(0, 0, CHAR_LINEFEED):
case KEYPRESS(0, 0, CHAR_CARRIAGE_RETURN):
case KEYPRESS(0, CHAR_CARRIAGE_RETURN, 0):
case KEYPRESS(0, CHAR_CARRIAGE_RETURN, CHAR_CARRIAGE_RETURN):
case KEYPRESS(0, SCAN_RIGHT, 0):
exit = TRUE;
break;