On 3/12/2015 9:49 AM, Paolo Bonzini wrote: > If the menu key is ESC, do not restart boot unless > 1.5 seconds have passed. Otherwise users (trained by years of > repeatedly hitting keys to enter the BIOS) will end up hitting ESC > multiple times and immediately booting the primary boot device. > > Suggested-by: Matt DeVillier <[email protected]> > Signed-off-by: Paolo Bonzini <[email protected]> > --- > src/boot.c | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > diff --git a/src/boot.c b/src/boot.c > index f23e9e1..3aab8d4 100644 > --- a/src/boot.c > +++ b/src/boot.c > @@ -486,9 +486,15 @@ interactive_bootmenu(void) > , strtcpy(desc, pos->description, ARRAY_SIZE(desc))); > } > > - // Get key press > + // Get key press. If the menu key is ESC, do not restart boot unless > + // 1.5 seconds have passed. Otherwise users (trained by years of > + // repeatedly hitting keys to enter the BIOS) will end up hitting ESC > + // multiple times and immediately booting the primary boot device. > + int esc_accepted_time = irqtimer_calc(menukey == 1 ? 1500 : 0); > for (;;) { > scan_code = get_keystroke(1000); > + if (scan_code == 1 && !irqtimer_check(esc_accepted_time)) > + continue; > if (scan_code >= 1 && scan_code <= maxmenu+1) > break; > } Is there are reason to keep the use of ESC to exit the boot menu at all? Is that a feature that users use/expect? 1.5s may sound like a lot of time, but with many using a TV as the display these days, it can take longer than that to even init/sync the screen.
_______________________________________________ SeaBIOS mailing list [email protected] http://www.seabios.org/mailman/listinfo/seabios
