Spec and implement locale and keyboard layout info of the inputting language of OS
Reported by
citrixnj...@gmail.com,
Oct 16 2017
|
||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36 Steps to reproduce the problem: 1. Implement a text input field with Javascript. 2. Try to get the locale and keyboard layout info of the inputting language in Javascript. 3. Try to detect the keyboard layout change of OS in Javascript. What is the expected behavior? 1. Able to get the locale and keyboard layout info of the inputting language. 2. Able to get the notification when the user changes the inputting keyboard layout of OS. What went wrong? 1. Unable to get the locale and keyboard layout info of the inputting language. 2. Unable to get the notification when the user changes the inputting keyboard layout of OS. Did this work before? No Does this work in other browsers? No Chrome version: 61.0.3163.100 Channel: stable OS Version: 6.1 (Windows 7, Windows Server 2008 R2) Flash Version:
,
Oct 16 2017
Moreover, could you please help to add these APIs for multiple OS platforms(Windows, Linux, MacOS, Android, iOS, etc). Thanks a lot!
,
Oct 16 2017
,
Oct 17 2017
,
Oct 17 2017
Untriaged it so that feature request gets addressed. Thanks.!
,
Oct 17 2017
Not V8 related.
,
Oct 19 2017
Can you provide us with the use case that you need this for? I know there was a desire to spec this: https://dvcs.w3.org/hg/d4e/raw-file/tip/source_respec.htm a while ago. But I don't believe it ever got an implementation. Gary might be able to provide some context why.
,
Oct 25 2017
Hi, Thanks a lot for your attention on this feature request. The reason of requesting this feature is that Citrix RfHtml5 that runs on Chrome needs to get the keyboard layout of the local machine, and then send it to remote server side. But now there isn't any API of javascript to get the keyboard layout, so that we'd like the Chrome team to help to provide these APIs. Thanks and best regards!
,
Nov 20 2017
Hi, I'd like to clarify that the requirement is for Chrome Browser in general rather than Chrome OS. Thanks!
,
Mar 21 2018
See https://discourse.wicg.io/t/keyboardevent-getcharacterbykey-key-modifierlist/1857 for a related proposal. Getting locale and layout is complicated by the lack of an easy-to-use cross-platform list. BCP-47 does a lot of the heavy lifting, but things like Dvorak and custom key overrides make it non-trivial. The above proposal is to return the current key map pings without reference to the locale/layout, although the layout could be inferred from that information. |
||||||
►
Sign in to add a comment |
||||||
Comment 1 by citrixnj...@gmail.com
, Oct 16 2017