From: Colin Watson <cjwatson@ubuntu.com>
To: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Re: [RFC] [PATCH] Allow user defined key to interupt sleep command
Date: Mon, 16 Sep 2013 10:26:25 +0100 [thread overview]
Message-ID: <20130916092625.GA1803@riva.ucam.org> (raw)
In-Reply-To: <CAO_0yfO+S5+2jjHZGe1Uh9Q4Nw+t+tx1iLWTWm9M0ZhL0yJSWg@mail.gmail.com>
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 [cjwatson@ubuntu.com]
next prev parent reply other threads:[~2013-09-16 9:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-16 8:49 [RFC] [PATCH] Allow user defined key to interupt sleep command Yang Bai
2013-09-16 9:26 ` Colin Watson [this message]
2013-09-16 10:46 ` Yang Bai
2013-09-16 10:57 ` Colin Watson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130916092625.GA1803@riva.ucam.org \
--to=cjwatson@ubuntu.com \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).