Re: proposal: add input/keyboard locale to text and keyboard events

Aharon Lanin proposed to add the following event properties:
<quote>
In TextEvent:

inputModeLocale of type DOMString, readonly
    A code indicating the locale of the input mode (e.g. keyboard, IME, 
handrwriting, etc.) that was used to generate the event, e.g. en-US. May 
be null when unknown or inapplicable, e.g. for dropped or pasted text.

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

In KeyboardEvent:

keyboardLocale of type DOMString, readonly
    A code indicating the locale of the keyboard configuration that was 
used to generate the event, e.g. en-US.

    Note: keyboardLocale 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 
keyboardLocale 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.
</quote>

1) Since it seems that the same type of information will be reported for 
both events, is there a good reason to have different names for the 
properties?  Since inputModeLocale is more general than keyboardLocale, it 
can be used for both.

2) For more homogeneity, I suggest that unknown or inapplicable situations 
return an empty string, or even a string which characterizes the type of 
situation, like "!!-unknown" or "!!-notext".


Shalom (Regards),  Mati
           Bidi Architect
           Globalization Center Of Competency - Bidirectional Scripts
           IBM Israel

Received on Sunday, 18 July 2010 11:48:44 UTC