> On May 19, 2015, at 2:06 PM, S.Vieira <jwvsan...@outlook.com> wrote:
> 
> Hi everyone.
> 
> 
> I have a simple question ...
> 
> How to clear the gST->Coin->WaitForKey   ?!
> 
> Because I use twice in my code, but in the second time which i use, it uses
> the previous value.
> 
> For example :
> 
> Print(L"Press any key");
> 
> tmpEvent = gST->ConIn->WaitForKey;
> gBS->WaitForEvent(1,&(gST->ConIn->WaitForKey),&Aux);/*!< is typed Y,for
> example */
> 
> *
> *
> *
> 
> gBS->WaitForEvent(1,&(gST->ConIn->WaitForKey),&wait);/*!< in here it uses
> the value typed before...(Y)*/
> StatusKeyPressed = gST->ConIn->ReadKeyStroke(gST->ConIn,&KeyPressed);
> 


See EblGetCharKey() in 
https://svn.code.sf.net/p/edk2/code/trunk/edk2/EmbeddedPkg/Ebl/Main.c

The simple, non timeout, version is:

      gBS->WaitForEvent (1, &gST->ConIn->WaitForKey, &EventIndex);
      Status = gST->ConIn->ReadKeyStroke (gST->ConIn, &Key);
      if (EFI_ERROR(Status)) {
        break;
      }

You need to read the key. 

Thanks,

Andrew Fish

> 
> Thx Everyone.
> 
> S.Vieira
> 
> 
> ------------------------------------------------------------------------------
> One dashboard for servers and applications across Physical-Virtual-Cloud 
> Widest out-of-the-box monitoring support with 50+ applications
> Performance metrics, stats and reports that give you Actionable Insights
> Deep dive visibility with transaction tracing using APM Insight.
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/edk2-devel


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to