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

If the proposed (some global object).currentInputModeLocale refers to the
speech recognition software during a speech event and to handwriting
recognition software during a handwriting event and to the keyboard during a
keyboard event, then what does it refer to outside the scope of any event,
or during some event unrelated to text?

Perhaps it should then be redefined as .lastInputLocale, indicating the
locale of the last text input device to have generated input. But then if
the last txt event was due to a paste operation, would it become null? If
yes, then the input locale is no longer available outside the scope of
events until the next time there is input. And if no, then during the
paste's text event its value would be misleading (it has nothing to do with
the pasted text). I guess it could become null during the paste text event,
and then go back to the last non-null value after the event is over, but
this is getting a little complicated. What's wrong with putting the value
right in the event?

Mind you, I agree that having the input locale available outside the scope
of events would indeed be useful. Perhaps (some global
object).lastInputLocale should be made available in addition to inputLocale
in the events. It would get updated on every text and keyboard event with a
non-null inputlocale.

Aharon

On Wed, Aug 4, 2010 at 9:45 PM, Olli Pettay <Olli.Pettay@helsinki.fi> wrote:

> http://lists.w3.org/Archives/Public/public-i18n-core/2010JulSep/0092.html
>
> So does the inputModeLocale (or whatever to call it) really need to be
> in the events?
> Could for example navigator object have .currentInputModeLocale.
> With that a text processor could try to guess the default language even
> before user starts to type and show that to user.
>
> During the events dispatched because of speech input for example,
> currentInputModeLocale would point to the "currentInputModeLocale",
> which is the locale for speech. Same with keyboards.
> So the main difference would be just that the default locale would be
> available even before any input has happened.
>
>
>
> -Olli
>
> PS. DOM 3 Events discussion happens in www-dom@w3.org.
>    For some reason I can't even subscribe to public-i18n-core@w3.org
>

Received on Thursday, 5 August 2010 06:48:33 UTC