* 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:
parent
607319c9ab
commit
436ad5c3f4
2 changed files with 17 additions and 1 deletions
|
@ -3,6 +3,12 @@
|
|||
* docs/grub.texi (Networking commands): Add documentation for
|
||||
network related commands.
|
||||
|
||||
2013-09-18 Pawel Wojtalczyk <eyak@wp.pl>
|
||||
2013-09-18 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* grub-core/term/efi/console.c (grub_console_getkey): Accept VT100-style
|
||||
codes.
|
||||
|
||||
2013-09-18 Colin Watson <cjwatson@ubuntu.com>
|
||||
|
||||
* grub-core/disk/efi/efidisk.c (grub_efidisk_get_device_name_iter):
|
||||
|
|
|
@ -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];
|
||||
|
||||
|
|
Loading…
Reference in a new issue