mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-25 08:39:28 +00:00
* grub-core/term/efi/console.c (grub_console_getkey): Accept VT100-style
codes. Also-By: Vladimir Serbinenko <phcoder@gmail.com>
This commit is contained in:
1 parent
607319c9ab
commit
436ad5c3f4
2 files changed
+17
-1
No files matched your search
@@ -125,7 +125,17 @@ grub_console_getkey (struct grub_term_input *term __attribute__ ((unused)))
|
||||
return GRUB_TERM_NO_KEY;
|
||||
|
||||
if (key.scan_code == 0)
|
||||
return key.unicode_char;
|
||||
{
|
||||
/* Some firmware implementations use VT100-style codes against the spec.
|
||||
This is especially likely if driven by serial.
|
||||
*/
|
||||
if (key.unicode_char < 0x20 && key.unicode_char != 0
|
||||
&& key.unicode_char != '\t' && key.unicode_char != '\b'
|
||||
&& key.unicode_char != '\n' && key.unicode_char != '\r')
|
||||
return GRUB_TERM_CTRL | (key.unicode_char - 1 + 'a');
|
||||
else
|
||||
return key.unicode_char;
|
||||
}
|
||||
else if (key.scan_code < ARRAY_SIZE (efi_codes))
|
||||
return efi_codes[key.scan_code];
|
||||
|
||||
|
||||
Reference in new issue
Block a user