22.2.2 ReadKeyStroke() and ReadKeyStrokeEx() Implementation

The ReadKeyStroke() and ReadKeyStrokeEx() functions are non-blocking operations that returns immediately with their Key and KeyData parameters containing the key code for the next key in the queue or it returns that there was no key code ready. These functions never wait for a key to be pressed. ReadKeyStroke() may be implemented to layer on top of ReadKeyStrokeEx() to share as much logic as possible.
If a key is read, the device specific keystroke information, such as scan codes must be converted into EFI_INPUT_KEY and EFI_KEY_DATA structure contents. The Console Support chapter of the UEFI Specification provides the details on how different keys, toggle keys, and shift states are to be translated into these structures.