grub-devel
[Top][All Lists]
Advanced

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

Re: [RFC] [PATCH] Allow user defined key to interupt sleep command


From: Colin Watson
Subject: Re: [RFC] [PATCH] Allow user defined key to interupt sleep command
Date: Mon, 16 Sep 2013 10:26:25 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

On Mon, Sep 16, 2013 at 04:49:46PM +0800, Yang Bai wrote:
> At now, sleep --interruptible 3 can only be interupted by ESC key.
> With this patch, we can special a key such as sleep --interruptible
> f10 3 and we can type F10 to interrupt the sleep. This can work as a
> hotkey handler.

This patch still duplicates key aliases from
grub-core/commands/menuentry.c, only it's slightly out of sync and has
its table in a different order for no discernible reason.  This is an
excellent illustration of why that table should be in only one place in
the source code.

Changing "sleep --interruptible" to require a string argument breaks a
user-visible interface.  Please do not do this.

Requiring the hotkey to be configured in two locations (once in the
menuentry command, once in "sleep --interruptible") is cumbersome.  It
also does not support recognising multiple hotkeys (i.e. any of those
configured for any menuentry command) at the hiddenmenu stage.

This patch does not pass hotkeys on to the menu.  As a result, you will
in practice end up pressing the hotkey twice to actually boot the
hotkeyed menu entry.

I think you have misunderstood the UI requirement here, and as a result
I don't think this patch is the right approach.  Sorry.

-- 
Colin Watson                                       address@hidden



reply via email to

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