This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 24044 - How do browsers decide combining character from non-combining character at computing .key value of dead key?
Summary: How do browsers decide combining character from non-combining character at co...
Status: RESOLVED FIXED
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: HISTORICAL - DOM3 Events (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Travis Leithead [MSFT]
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-10 08:48 UTC by Masayuki Nakano
Modified: 2014-05-07 23:58 UTC (History)
4 users (show)

See Also:


Attachments

Description Masayuki Nakano 2013-12-10 08:48:57 UTC
At least on Windows and Android, dead key event produces non-combining character for browsers. On the other hand, current D3E spec requires browsers setting combining character for dead key event.

For consistency behavior between browsers and all keyboard layouts on all platforms, browsers need to use same map from non-combining character to combining character at computing dead key event's .key value. However, perhaps, nobody can list-up all dead characters all over the world. Therefore, browsers may fail to convert non-combining character if it's not major language's.

I'm thinking that the simplest solution of .key value of dead key event should be non-combining character. And for web apps, adding a bool attribute such as KeyboardEvent.isDeadKey may be useful.

Any suggestions?
Comment 1 Travis Leithead [MSFT] 2013-12-11 01:26:28 UTC
What is the non-combining character that the OS provides to browsers? 

We could alternatively have the .key value be "DeadKey" for any dead key... might simplify things.

We also have to decide what compositionupdate.data will be during the dead key sequence.
Comment 2 Masayuki Nakano 2013-12-11 01:28:13 UTC
[10:19] <Travis> Is there a general "combining" key value?
[10:19] <Travis> I suppose we could invent one.
[10:20] <Travis> ... event.key == "DeadKey"
[10:20] <Travis> ... is almost as useful as event.isDeadKey
[10:21] <Travis> But, the compositionupdate event would still need to carry the combining key value in its data attribute, right?
[10:21] <masayuki> Hmm, yes.
[10:23] <masayuki> I feel strange native platforms give non-combining character, prehaps for displaying the character, but why web apps need combining character?
Comment 3 Travis Leithead [MSFT] 2014-05-05 20:03:47 UTC
> Regarding bug 24044: https://www.w3.org/Bugs/Public/show_bug.cgi?id=24044
> 
> I think the solution is to add the key value "DeadKey" correct?
> 
> <masayuki> A dead key process causes a set of composition events. So, web
> apps can get the inputting value of dead key sequence even if .key value
> is "DeadKey".
> 
> Right. Through the "data" value of the compositionevent objects.
> 
> <masayuki> Therefore, I think that "DeadKey" is simple solution for the issue.
> 
> Me too.
> 
> <masayuki> It's hard to define a mapping table for combining characters <->
> non-combining character...


http://www.w3.org/2014/04/30-webapps-minutes.html
Comment 4 Travis Leithead [MSFT] 2014-05-06 00:38:37 UTC
First attempt at a fix in changelist: https://dvcs.w3.org/hg/dom3events/rev/662bf4d9897a

Re-worked some sections of the prose to more accurately reflect what changes we are making regarding dead keys and the firing of composition events (we had already decided on this, but the spec text was inconsistent, and so I fixed those cases when scanning for occurrences of "dead keys".

I also added "Dead Key" to the key tables in the key values spec in the IME/Composition section (seemed most appropriate).

Please review the example event sequences and make sure it's correct and that I didn't miss anything.

Thanks!
Comment 5 Travis Leithead [MSFT] 2014-05-07 00:43:38 UTC
After Telco discussion, the key needs to drop the "Key" suffix and become simply "Dead". Works for me...
Comment 6 Travis Leithead [MSFT] 2014-05-07 23:58:16 UTC
I've now updated "DeadKey" to simply "Dead". It's dead Jim.

https://dvcs.w3.org/hg/dom3events/rev/7216e27ddf14