Open
Bug 1017383
Opened 10 years ago
Updated 2 years ago
Guess KeyboardEvent.code value from virtual keycode when scancode is 0 (e.g., inputting from VKB)
Categories
(Core :: DOM: Events, defect)
Tracking
()
NEW
People
(Reporter: masayuki, Unassigned)
References
Details
Attachments
(1 file)
32.40 KB,
patch
|
Details | Diff | Splinter Review |
When scancode is 0, we should guess KeyboardEvent.code values from virtual keycode as far as possible. This is necessary to support VKB input. Key events from VKB may not have proper scancode value. But we need to emulate it. https://dvcs.w3.org/hg/dom3events/raw-file/tip/html/DOM3-Events.html#code-virtual-keyboards
Reporter | ||
Comment 1•10 years ago
|
||
This patch adds a mapping table from virtual keycode of Android to .code value. This patch does NOT map any printable keys in standard position because the mapping depends on selected keyboard layout. Therefore, I think that it's impossible to emulate printable key' code value with a lot of keyboard layouts. # Android doesn't have an API to compute scancode from virtual keycode like Windows. FYI: The spec is here: https://dvcs.w3.org/hg/dom3events/raw-file/tip/html/DOM3-Events.html#code-virtual-keyboards I'll ask this printable key issue to WG tomorrow if we have much time. Otherwise, I'll file a spec bug for it. Anyway, at least for now, emulating non-printable key's code values is important because it makes I fix bug 936313 easier.
Attachment #8433400 -
Flags: review?(bugs)
Comment 2•10 years ago
|
||
Need to wait for some resolution for the printable keys, since it would be odd to support only non-printables, IMO.
Comment 3•10 years ago
|
||
Btw, could you add the spec bug url here, if there is such.
Reporter | ||
Comment 4•10 years ago
|
||
Spec bug: https://www.w3.org/Bugs/Public/show_bug.cgi?id=25968
Comment 5•10 years ago
|
||
Comment on attachment 8433400 [details] [diff] [review] Patch Clearing the review request until we have some resolution to the spec bug. Currently the spec says "code holds a string that identifies the physical key being pressed." so that at least should be changed somehow. There isn't anything physical in case of a vkb.
Attachment #8433400 -
Flags: review?(bugs)
Reporter | ||
Comment 6•10 years ago
|
||
Sorry. Garykac said that nobody should "guess" .code value. He will update the document. Let's wait the new explanation for confirming his exact intention.
Reporter | ||
Comment 7•4 years ago
|
||
Resetting assignee which I don't work on in this several months.
Assignee: masayuki → nobody
Status: ASSIGNED → NEW
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•