w3c / virtual-keyboard

VirtualKeyboard API
https://w3c.github.io/virtual-keyboard/
Other
16 stars 3 forks source link

Locale Support #17

Open msoares1979 opened 2 years ago

msoares1979 commented 2 years ago

keyboards are dependent on current language and other locale attributes. Most importantly, characters layout may be affected by it. So there should be a way for this new VirtualKeyboard API to consider it and to adapt on modifications of its value.

HolgerJeromin commented 2 years ago

The current language of the keyboard could/should be based on the lang attribute of the focused element.

css-meeting-bot commented 2 years ago

The Web Editing Working Group just discussed Locale Support.

The full IRC log of that discussion <Travis> Topic: Locale Support
<Travis> github: https://github.com/w3c/virtual-keyboard/issues/17
<Travis> BoCupp: question: is there an attempt to change the keyboard language using attributes in the webpage?
<Travis> .. feedback from those who are multi-language?
<Travis> johanneswilm: I'm multi-language.
<Travis> .. super frustrating when keyboard doesn't change...
<Travis> BoCupp: There context there...it depends on where you're providing input?
<Travis> johanneswilm: yes, that's also true.
<Travis> BoCupp: Should we ask for clarifications?
<Travis> johanneswilm: you can imagine textbox where you need to imput sweedish...
<Travis> .. annoying if you have to manually switch.
<Travis> .. would be nice if the text input with different langs would switch the keyboard automatically.
<Travis> wenson: I could see it being used as a hint to present the keyboard appropriate for the specified `lang` value, if the user has added it as an input method. But I can also see how it would be confusing
<Travis> johanneswilm: could there be a fingerprinting issue? If the site requests a language, and the keyboard has to change size to accommodate?
<Travis> BoCupp: We do have some existing fingerprinting issues through (keyboard map?) where the key maps an input to an output...
<Travis> .. currently requires permission (prompt?)
<Travis> .. that's the current mitigation.
<Travis> .. keyboard event also has it...
<Travis> .. so I'm not worried too much about it.
<Travis> wenson: the fingerprinting vector is primarily the reason WebKit hasn't implemented the keybaord map.
<Travis> BoCupp: we got educated by the Office team on how keyboard shortcuts works...
<Travis> .. eg., ctrl+a, where 'a' is in a different place on the keyboard.
<Travis> .. can change depending on keyboard map.
<Travis> .. on different keyboards you might get a scan code for 'q' from a key on upper-left corner.
<Travis> .. but that physical key location always has the same scan code (may have a different key label).
<Travis> .. so the OS has to interpret the scan-code to determine the map of where the actual character is.
<Travis> .. so, for Ctrl+A the key depends.
<Travis> wenson: I ack that the use case is useful, but the JS is not the only place for a solution.
<Travis> johanneswilm: even though textfield needs german... 'z' and 'y' are switched. Often users mix these out. Some users have a preference for which they like.
<Travis> .. if the keyboard auto-switches, that might be frustrating for these people.
<Travis> .. we can't reliably tell which keyboard layout should be applied.
<Travis> BoCupp: propose we seek more info around.
<Travis> .. I'll note a few points in the issue.
<Travis> .. Separately, I might ask the person who educated me (from Office) to come and speak to us? If it might be of help to the group?
<johanneswilm> johannes: even if website communicates language, there are multiple correspondign keyboard layouts
<Travis> .. from their perspective (from a web author) "what should I do to see if the user has invoked one of my shortcuts"
<Travis> whsieh: I suppose we could consider it.
<Travis> .. last discussion was with garyk. That was a while ago.
<Travis> .. I'd be OK to hearing from word/ a productivity app.
<Travis> Zakim: Wenson is whsieh
<Travis> johanneswilm: Note, in some languages keyboard shortcuts are different depending on language.
<Travis> .. in Spanish, Ctrl+N (for Ctrl+B)--bold.
<Travis> .. but is different otherwise.
<Travis> .. in other languages.
<Travis> .. Ctrl+N has an interesting history.
msoares1979 commented 2 years ago

The current language of the keyboard could/should be based on the lang attribute of the focused element.

Perhaps there should be a shortcut so the VirtualKeyboard object would know which one is the mentioned focused element and ways to register listeners to adapt itself whenever the current focused element modifies its lang attribute.

css-meeting-bot commented 2 years ago

The Web Editing Working Group just discussed Locale support.

The full IRC log of that discussion <Travis> topic: Locale support
<Travis> github: https://github.com/w3c/virtual-keyboard/issues/17
<Travis> johanneswilm: we talked about this last time.
<Travis> .. I think Microsoft wanted to get more info before continuing...
<Travis> .. alex; is there anything you found?
<Travis> Anupam: Hi folks, just joined.
<Travis> .. looks like we still need to discuss with Office. We will have to follow up before next meeting.
snianu commented 2 years ago

Removing the Agenda+ label for now. We can discuss this async.