From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1VLV4q-0007tt-Mw for mharc-grub-devel@gnu.org; Mon, 16 Sep 2013 05:26:40 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33411) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VLV4k-0007tH-Un for grub-devel@gnu.org; Mon, 16 Sep 2013 05:26:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VLV4e-0005xu-Rm for grub-devel@gnu.org; Mon, 16 Sep 2013 05:26:34 -0400 Received: from v6.chiark.greenend.org.uk ([2001:ba8:1e3::]:60875 helo=chiark.greenend.org.uk) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VLV4e-0005xo-Lu for grub-devel@gnu.org; Mon, 16 Sep 2013 05:26:28 -0400 Received: from [172.20.153.9] (helo=riva.pelham.vpn.ucam.org) by chiark.greenend.org.uk (Debian Exim 4.72 #1) with esmtps (return-path cjwatson@ubuntu.com) id 1VLV4d-0006CO-5E for grub-devel@gnu.org; Mon, 16 Sep 2013 10:26:27 +0100 Received: from ns1.pelham.vpn.ucam.org ([172.20.153.2] helo=riva.ucam.org) by riva.pelham.vpn.ucam.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1VLV4c-0000Uj-D8 for grub-devel@gnu.org; Mon, 16 Sep 2013 10:26:26 +0100 Date: Mon, 16 Sep 2013 10:26:25 +0100 From: Colin Watson To: The development of GNU GRUB Subject: Re: [RFC] [PATCH] Allow user defined key to interupt sleep command Message-ID: <20130916092625.GA1803@riva.ucam.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:ba8:1e3:: X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Sep 2013 09:26:39 -0000 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]