public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Aaron.Pop@congatec.com
To: <Senthilarasu_ARUNACH@Dell.com>
Cc: <edk2-devel@lists.01.org>
Subject: Re: Foreign keyboard support in UEFI
Date: Tue, 2 Aug 2016 12:16:24 -0700	[thread overview]
Message-ID: <OF9E3AF4AE.439F60CC-ON88258003.00605A12-88258003.0069DEFD@congatec.com> (raw)
In-Reply-To: <0015e1368c8743f7a0834fa4cc913ccc@ausx13mpc122.AMER.DELL.COM>

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:   <Senthilarasu_ARUNACH@Dell.com>
To:     <edk2-devel@lists.01.org>
Date:   08/01/2016 09:53 PM
Subject:        [edk2] Foreign keyboard support in UEFI
Sent by:        "edk2-devel" <edk2-devel-bounces@lists.01.org>



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
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel




  reply	other threads:[~2016-08-02 19:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-02  4:52 Foreign keyboard support in UEFI Senthilarasu_ARUNACH
2016-08-02 19:16 ` Aaron.Pop [this message]
2016-08-03  1:36   ` Senthilarasu_ARUNACH
2016-08-03  1:37   ` Senthilarasu_ARUNACH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=OF9E3AF4AE.439F60CC-ON88258003.00605A12-88258003.0069DEFD@congatec.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox