Re: [UIEvents] Firing composition events for dead keys

> On Jan 9, 2016, at 6:33 PM, Olli Pettay <olli@pettay.fi> wrote:
> 
> On 01/10/2016 01:14 AM, Ryosuke Niwa wrote:
>> Hi all,
>> 
>> This is another feedback from multiple browser vendors (Apple, Google, Microsoft) that got together in Redmond last Thursday to discuss editing API and related events.
>> 
>> 
>> We found out that all major browsers (Chrome, Firefox, and Safari) fire composition events for dead keys on Mac but they don't on Windows.  I think this difference comes from the underlying platform's difference but we think we should standardize it to always fire composition events for consistent behavior across platforms.
>> 
>> Does anyone know of any implementation limitation to do this?  Or are there any reason we should not fire composition events for dead keys on Windows?
>> 
> 
> Does anyone know the behavior on Linux.
> 
> What is the exact case you're talking about here? do you have a test case?

Sure. On Mac, you can enable International English keyboard and type ' key and then u.

On Mac:
1. Pressing ' key inserts ' (character) and fires `compositionstart` event.
2. Pressing u key replaces ' with ú and fires `compositionend`.


On Windows, dead key doesn't insert any character at all, and pressing the second key insert the composed character.

Looking at MSDN:
https://msdn.microsoft.com/en-us/library/windows/desktop/ms646267(v=vs.85).aspx#_win32_Dead_Character_Messages

dead key should issue WM_KEYDOWN as well as WM_DEADCHAR in TranslateMessage so I don't think there is an inherent platform limitation to fire composition events.

- R. Niwa

Received on Sunday, 10 January 2016 03:05:35 UTC