W3C home > Mailing lists > Public > www-dom@w3.org > July to September 2010

Re: proposal: add input/keyboard locale to text and keyboard events [ISSUE-119]

From: Aharon (Vladimir) Lanin <aharon@google.com>
Date: Sun, 12 Sep 2010 17:11:02 +0200
Message-ID: <AANLkTinuKm=G61hJX+nSz3KATYfMkN34QkU93SXsR3Hy@mail.gmail.com>
To: DOM public list <www-dom@w3.org>
>From what I can see, the message with the exact language of the proposal (
http://lists.w3.org/Archives/Public/www-dom/2010JulSep/0075.html) hasn't
been referenced for issue 119. It's as follows:

Proposal: An additional property in the TextEvent and KeyboardEvent
DOM3 interfaces to indicate the locale of the keyboard or other input
device using which the input was generated. When this is unknown (e.g.
when the input method is paste, or when the implementation can not obtain
this information from the underlying platform), the property should be null
(or perhaps undefined, whichever conforms to DOM3 conventions better).

Here is a draft for the documentation of the new event attributes,
striving to conform in style to
http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#events-textevents

In TextEvent:

inputLocale of type DOMString, readonly
    A BCP-47 tag indicating the locale for which the origin of the
event (whether keyboard, IME, handwriting recognition software, or other
input mode) is configured, e.g. "en-US". May be null [undefined?]
when inapplicable or unknown, e.g. for pasted text or when this
information is not exposed by the underlying platform.

Note: inputLocale does not necessarily indicate the locale of the data or
the context in which it is being entered. For example, a French user often
may not switch to an English keyboard when typing English, in which case the
inputLocale will still indicate French, even though the data is actually
English.

In KeyboardEvent:

inputLocale of type DOMString, readonly
    A BCP-47 tag indicating the locale for which the keyboard used
to generate the event is configured, e.g. en-US. May be null [undefined?]
when unknown, e.g. when this information is not exposed by the
underlying platform.

Note: inputLocale does not necessarily indicate the locale of the text that
the user may be keying in. For example, a French user often may not switch
to an English keyboard when typing English, in which case the inputLocale
will still indicate French. Nor can it be used to definitively calculate the
"physical" or "virtual" key associated with the event, or the character
printed on that key.
Received on Sunday, 12 September 2010 15:11:53 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:14:05 GMT