|
From: | Isaac Dupree |
Subject: | Re: [PATCH] if timeout is set to zero, don't bother drawing the menu |
Date: | Sun, 10 Feb 2008 15:24:43 -0500 |
User-agent: | Thunderbird 2.0.0.6 (X11/20071022) |
Yoshinori K. Okuji wrote:
On Sunday 10 February 2008 13:55, Robert Millan wrote:We could make the behaviour be, that if ESC is pressed at any time before an input line is completed, the operation is aborted, read returns non-zero, and it doesn't save the line to any variable. What do you think?Not bad. :)
:)
In GRUB Legacy, the hidden menu uses ESC, because if it uses ENTER, and the user pushes ENTER too long, and a key repeat occurs, then the first item may be selected quick as a flash. But we could avoid this problem by vacuuming all inputs before showing a menu, so it might be acceptable to use ENTER instead.This is still error-prone. Even if you vacuum the input buffer, we stillhave a race between user unholding ENTER and GRUB showing the menu. Vacuuming the buffer just gives us more time, but doesn't garantee goodresults.Sure, but I think it would be good enough in reality.
most realities. Probably it will bite someone some day.A 1/10th second delay or so after display before listening for input might reduce the chances of that, though increase the very same chances of the enter-press for the menu being intentional but dropped.
-Isaac
[Prev in Thread] | Current Thread | [Next in Thread] |