[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Support for different hotkey action than execute

From: Andreas Born
Subject: Re: Support for different hotkey action than execute
Date: Sun, 04 Mar 2012 22:13:47 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.2) Gecko/20120220 Thunderbird/10.0.2

Any problem with this patch? Or why is there no comment? I know, it's really long. ;)

In fact, if possible, I'd be very happy if we can still get this into 2.00.

Am 27.02.2012 00:08, schrieb Andreas Born:
Attached patch introduces a new environment variable hotkey_action. It can be set to select or execute, whereas the latter is the default. So the default behaviour doesn't change. With select set instead a menu entry is just selected and not executed/booted on hotkey press.

This is for example useful for long menus to directly jump to some initial and afterwards select the desired entry without going through the whole menu. One still has to explicitly mark the menu entry to jump to with the hotkey attribute. This patch only allows to change the action to take on hotkey press.

Not much code and most is inspired from grub_menu_get_timeout. Applies and works with r3991.

    Add support to the menu for changing the action on hotkey press:
    execute (default), select

    * grub-core/normal/menu.c (DEFAULT_HOTKEY_ACTION): New define.
    (run_menu): Handle hotkey_action.
    (grub_menu_get_hotkey_action): New function.
    * include/grub/menu.h (grub_menu_get_hotkey_action): New prototype.
    (grub_hotkey_action_type_t): New enum.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]