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

Dell - Internal Use - Confidential
Aaron,
Thanks for detailed information to start our investigation   . Will keep update our findings in this forum.


From: Aaron.Pop@congatec.com [mailto:Aaron.Pop@congatec.com]
Sent: Tuesday, August 2, 2016 2:16 PM
To: Arunachalam, Senthil <Senthilarasu_ARUNACH@Dell.com>
Cc: edk2-devel@lists.01.org
Subject: Re: [edk2] Foreign keyboard support in UEFI

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



  reply	other threads:[~2016-08-03  1:36 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
2016-08-03  1:36   ` Senthilarasu_ARUNACH [this message]
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=09017dc6f67e4efa8fc28e06f8646187@ausx13mpc122.AMER.DELL.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