Hi Senthil,

Multi language keyboards support should be pretty transparent to an 
application. The simple text input protocols are designed to return a 
unicode character, and the protocols leave the mapping of keypress into 
the current keyboard layout to the system firmware.  Keyboard layouts are 
installed into the Hii database, and then a set keyboard layout call is 
made to tell the system which keyboard layout to use. Each regional 
keyboard has a different layout (
https://msdn.microsoft.com/en-us/goglobal/bb964651.aspx).  The UEFI 
specification (section 31.2.4) maps a keyboard into an enumerated value 
(EFI_KEY in MdePkg\Include\Uefi\UefiInternalFormRepresentation.h) and that 
enumerated value is used as an index into the keyboard layout data to 
return a unicode character for a specific keypress. 

If you are not getting a valid return character when you press a key on a 
usb keyboard, then there is a chance that the UsbKbDxe driver does not 
consider the key you pressed as a valid Usb key for the given keyboard 
layout.  USB keyboards return a Usage ID for a given key press (
http://www.usb.org/developers/hidpage/Hut1_12v2.pdf).  The EDK2 Usb 
keyboard driver (MdeModulePkg/Bus/Usb/UsbKbDxe) retrieves the USB usage id 
and translates it into an EFI_KEY_DATA entry by using the tables in the 
top of the Keyboard.c file (EfiKeyToUsbKeyCodeConvertionTable and 
mUsbKeyboardLayoutBin).  It is possible that your system does not 
correctly map the hid usage id to a valid EFI_KEY enum based on the 
current keyboard mapping layout. 

I hope this gives you enough information to start to figure out your 
issue.





From:   <[email protected]>
To:     <[email protected]>
Date:   08/01/2016 09:53 PM
Subject:        [edk2] Foreign keyboard support in UEFI
Sent by:        "edk2-devel" <[email protected]>



Hi,
Any one shed some light on supporting multi language key board  support on 
 UEFI application? Scan code received from 
EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL not returns  value for
certain keys in  German/Arabic USB keyboard. We are also not sure in 
mapping UEFI code from EFI_HII_DATABASE_PROTOCOL.GetKeyBoardLayOut()).


Thanks
Senthil





_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel


_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to