15.03.2015 Views

SetupDesignGuide.pdf - Firmware Encoding Index

SetupDesignGuide.pdf - Firmware Encoding Index

SetupDesignGuide.pdf - Firmware Encoding Index

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Setup Design Guide<br />

DRAFT<br />

7.1.13 EFI_HII_PROTOCOL.GetKeyboardLayout()<br />

Summary<br />

This function allows a program to retrieve the keyboard layout data that has previously been registered<br />

with the EFI HII database.<br />

Prototype<br />

EFI_STATUS<br />

(EFIAPI *EFI_HII_GET_KEYBOARD_LAYOUT) (<br />

IN EFI_HII_PROTOCOL *This,<br />

IN OUT UINT16<br />

DescriptorCount,<br />

OUT EFI_KEY_DESCRIPTOR *Descriptor<br />

);<br />

Parameters<br />

This<br />

DescriptorCount<br />

Descriptor<br />

A pointer to the EFI_HII_PROTOCOL instance.<br />

On input, the number of Descriptor entries the buffer can hold.<br />

On output, the number of entries of the returned buffer, if the length<br />

was sufficient and, if it was not, the number of entries that is required<br />

to fit the requested keyboard layout data.<br />

The pointer to the buffer designed to receive the keyboard layout<br />

data.<br />

Description<br />

This function is used to extract the keyboard layout. The returned buffer will contain the current default<br />

system descriptor data merged with any override keyboard data. For example, if the firmware default<br />

keyboard is the U.S. keyboard and a driver added via NewPack a keyboard descriptor set for a<br />

Germany keyboard, the layout which is retrieved will reflect the U.S. keyboard with the Germany<br />

overrides.<br />

If a program needed to acquire the base keyboard layout, it could do the following: Issue a<br />

GetKeyboardLayout and cache the results. Issue a NewPack with a keyboard descriptor count of<br />

zero to wipe out the keyboard overrides. Issue a GetKeyboardLayout to get the base keyboard<br />

layout, and update via NewPack the original overrides.<br />

Status Codes Returned<br />

EFI_SUCCESS<br />

EFI_BUFFER_TOO_SMALL<br />

KeyDescriptor filled with the requested keyboard<br />

layout. KeyDescriptorCount updated.<br />

The buffer provided was not large enough to allow the<br />

form to be stored.<br />

66

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!