public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [MdeModulePkg/TerminalDxe] Why do we delay 2s for ESC being pressed?
@ 2017-11-08  7:04 Heyi Guo
  2017-11-08  7:24 ` Zeng, Star
  0 siblings, 1 reply; 14+ messages in thread
From: Heyi Guo @ 2017-11-08  7:04 UTC (permalink / raw)
  To: edk2-devel@lists.01.org; +Cc: Zeng, Star, Eric Dong

Hi folks,

We found ESC key responded fairly slow on serial port terminal, and we 
think it might be caused by the code in UnicodeToEfiKey in TerminalConIn.c:

     if (UnicodeChar == ESC) {
       TerminalDevice->InputState = INPUT_STATE_ESC;
     }

     if (UnicodeChar == CSI) {
       TerminalDevice->InputState = INPUT_STATE_CSI;
     }

     if (TerminalDevice->InputState != INPUT_STATE_DEFAULT) {
       Status = gBS->SetTimer(
                       TerminalDevice->TwoSecondTimeOut,
                       TimerRelative,
                       (UINT64)20000000
                       );
       ASSERT_EFI_ERROR (Status);
       continue;
     }

It seems we intentionally add 2 seconds delay for ESC key press. This 
provides not so good user experience when we press ESC to exit or cancel 
some operation.

We tried reducing this timeout value to 1 second, then the experience 
improved much and we didn't find any issue introduced.

What's the reason for this timeout value and is there any improvement?

Thanks and regards,

Heyi



^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2017-11-29  4:13 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-08  7:04 [MdeModulePkg/TerminalDxe] Why do we delay 2s for ESC being pressed? Heyi Guo
2017-11-08  7:24 ` Zeng, Star
2017-11-08  7:55   ` Ni, Ruiyu
2017-11-08  8:30     ` Heyi Guo
2017-11-08  8:34       ` Ni, Ruiyu
2017-11-08  8:44         ` Heyi Guo
2017-11-08  8:46           ` Ni, Ruiyu
2017-11-08  8:51             ` Heyi Guo
2017-11-08  9:07           ` Gerd Hoffmann
2017-11-08 13:34             ` Heyi Guo
2017-11-08 16:00               ` Brian J. Johnson
2017-11-24  7:21                 ` Heyi Guo
2017-11-28 17:55                   ` Brian J. Johnson
2017-11-29  4:18                     ` Andrew Fish

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox