Hotkey support
* include/grub/menu.h (grub_menu_entry): New field 'hotkey'. * normal/main.c (hotkey_aliases): New variable. (grub_normal_add_menu_entry): Parse "--hotkey". * normal/menu_text.c (run_menu): Handle hotkeys.
This commit is contained in:
commit
c5ac9b32ac
4 changed files with 62 additions and 0 deletions
|
@ -478,6 +478,18 @@ run_menu (grub_menu_t menu, int nested, int *auto_boot)
|
|||
goto refresh;
|
||||
|
||||
default:
|
||||
{
|
||||
grub_menu_entry_t entry;
|
||||
int i;
|
||||
for (i = 0, entry = menu->entry_list; i < menu->size;
|
||||
i++, entry = entry->next)
|
||||
if (entry->hotkey == c)
|
||||
{
|
||||
menu_fini ();
|
||||
*auto_boot = 0;
|
||||
return i;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue