loader.efi: efi_readkey_ex needs to key despite the shift status or toggle status

From UEFI specification 2.8, page 434:
"It should also be noted that certain input devices may not be able to produce
shift or toggle state information, and in those cases the high order bit in
the respective Toggle and Shift state fields should not be active."

But we still need to check for ScanCode and UnicodeChar.

PR:		242660
Reported by:	Trond Endrestol
MFC after:	1 week
This commit is contained in:
Toomas Soome 2019-12-17 08:30:11 +00:00
parent 359e4dba07
commit ade8a0f1d1
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=355844

View File

@ -1126,11 +1126,15 @@ efi_readkey_ex(void)
kp->UnicodeChar++;
}
}
if (kp->ScanCode == 0 && kp->UnicodeChar == 0)
return (false);
keybuf_inschar(kp);
return (true);
}
/*
* The shift state and/or toggle state may not be valid,
* but we still can have ScanCode or UnicodeChar.
*/
if (kp->ScanCode == 0 && kp->UnicodeChar == 0)
return (false);
keybuf_inschar(kp);
return (true);
}
return (false);
}