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 [cjwat...@ubuntu.com] _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel