>>>>>>>>>>>>>>
"Somebody Smart" <
brucec...@gmail.com> wrote in message
news:cb68e2fc-e394-4bdc...@googlegroups.com...
"Somebody Smart"... I like that. Not very many people are as smart
as they think they are, especially me :-)
Anyway, here is the code I use:
// ReadKeyStroke returns EFI_NOT_READY if no key available
// ReadKeyStroke returns EFI_SUCCESS if a key is available
// It will not wait for a key to be available.
EFI_STATUS kbhit(struct EFI_INPUT_KEY *Key) {
return gSystemTable->ConIn->ReadKeyStroke(gSystemTable->ConIn, Key);
}
// Wait for a key to be available, then read the key using ReadKeyStroke
EFI_STATUS getkeystroke(struct EFI_INPUT_KEY *Key) {
WaitForSingleEvent(gSystemTable->ConIn->WaitForKey, 0);
return gSystemTable->ConIn->ReadKeyStroke(gSystemTable->ConIn, Key);
}
Ben
P.S. I don't use the wrapper. I use a variation of Alex's C compiler
which produces the correct function parameter list order.
--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Forever Young Software
http://www.fysnet.net/index.htm
http://www.fysnet.net/osdesign_book_series.htm
To reply by email, please remove the zzzzzz's
Batteries not included, some Assembly required.