Extensible Firmware Interface Specification
156 12/12/00 Version 1.02
7.3.2 SIMPLE_INPUT.ReadKeyStroke
Summary
Reads the next keystroke from the input device.
Prototype
EFI_STATUS
(EFIAPI *EFI_INPUT_READ_KEY) (
IN SIMPLE_INPUT_INTERFACE *This,
OUT EFI_INPUT_KEY *Key
);
Parameters
This A pointer to the SIMPLE_INPUT_INTERFACE instance. Type
SIMPLE_INPUT_INTERFACE is defined in Section 7.3.
Key A pointer to a buffer that is filled in with the keystroke
information for the key that was pressed. Type
EFI_INPUT_KEY is defined in “Related Definitions”.
Related Definitions
//*******************************************************
// EFI_INPUT_KEY
//*******************************************************
typedef struct {
UINT16 ScanCode;
CHAR16 UnicodeChar;
} EFI_INPUT_KEY;
Description
The ReadKeyStroke() function reads the next keystroke from the input device. If there is no
pending keystroke the function returns EFI_NOT_READY. If there is a pending keystroke, then
ScanCode is the EFI scan code defined in Table 7-2. The UnicodeChar is the actual printable
character or is zero if the key does not represent a printable character (control key, function
key, etc.).
Status Codes Returned
EFI_SUCCESS The keystroke information was returned.
EFI_NOT_READY There was no keystroke data available.
EFI_DEVICE_ERROR The keystroke information was not returned due to hardware errors.