w3c / uievents

UI Events
https://w3c.github.io/uievents/
Other
145 stars 51 forks source link

What's the rationale for the currently specified interaction between dead keys and `KeyboardEvent.key`? #281

Closed maroider closed 3 years ago

maroider commented 3 years ago

In particular, why is the following behaviour for KeyboardEvent.key specified when dead keys also are handled by CompositionEvent?

§ 6.3.2. Dead keys

[...]

Example 26

[...]

In the second keydown event (step 5), the key value (assuming the event is not suppressed) will not be "e" (Latin Small Letter E key) under normal circumstances because the value delivered to the user agent will already be modified by the dead key operation.

It seems to me (in my mildly uninformed opinion) that the OS APIs needed to only deliver "e" in KeyboardEvent.key exist on every major OS (except perhaps iOS, which I know nothing about).