Function registerKeyNotify [src]
Register a notification function for a particular keystroke for the input device.
Prototype
pub fn registerKeyNotify( self: *SimpleTextInputEx, key_data: *const Key, notify: *const fn (*const Key) callconv(cc) Status, ) RegisterKeyNotifyError!uefi.Handle Parameters
self: *SimpleTextInputExkey_data: *const Keynotify: *const fn (*const Key) callconv(cc) Status Possible Errors
Source
pub fn registerKeyNotify(
self: *SimpleTextInputEx,
key_data: *const Key,
notify: *const fn (*const Key) callconv(cc) Status,
) RegisterKeyNotifyError!uefi.Handle {
var handle: uefi.Handle = undefined;
switch (self._register_key_notify(self, key_data, notify, &handle)) {
.success => return handle,
.out_of_resources => return Error.OutOfResources,
else => |status| return uefi.unexpectedStatus(status),
}
}