Hello!
According to the UEFI specification
`EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL.RegisterKeyNotify()` function
registers a notification function for a particular keystroke for the
input device.
Its prototype is:
```
typedef
EFI_STATUS
(EFIAPI *EFI_REGISTER_KEYSTROKE_NOTIFY) (
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
IN EFI_KEY_DATA *KeyData,
IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction,
OUT VOID **NotifyHandle
);
```
I want to use this function in my driver. My question is about the
`KeyData` argument. Do I need to keep it in memory after a
`RegisterKeyNotify` function call? For example, use allocate services
for `KeyData` memory, or simply declare it as a global variable. Or we
can create `KeyData` as a local function variable on stack?
The `KeyData` argument is passed by reference and it is unclear to me
whether it should be kept in memory or not.
Best regards,
Konstantin Aladyshev