Re: [w3c/uievents] Clarify `keypress` event handling for keys that map to non-BMP Unicode symbols (Issue #346)

> IIRC, a pair of WM_CHAR is sent by Windows for a surrogate pair input.

@masayuki-nakano Thank you for clarifying this. Since this is the case, it would seem that there is some misalignment with Safari because Safari is only available on macOS and macOS dispatches the entire surrogate pair for an input.

With this information, there are three viewpoints to this problem:

 - From the OS perspective, the browser should make the same number of keypresses as number of events emitted to it. This implies the following table:

|         | Chrome | Firefox | Safari |
|---------|--------|---------|--------|
| Windows | 2      | 2       | N/A    |
| macOS   | 1      | 1       | 1      |

 - From the user perspective, the browser should make the same number of keypresses as the user makes. This implies the following table:

|         | Chrome | Firefox | Safari |
|---------|--------|---------|--------|
| Windows | 1      | 1      | N/A    |
| macOS   | 1      | 1       | 1      |

 - From the browser perspective, we should normalize behavior across platforms based on the (1) and (2). This implies the following tables:

|         | Chrome | Firefox | Safari |
|---------|--------|---------|--------|
| Windows | 2      | 2      | N/A    |
| macOS   | 2      | 2      | 1      |

OR

|         | Chrome | Firefox | Safari |
|---------|--------|---------|--------|
| Windows | 1      | 1      | N/A    |
| macOS   | 1     | 1       | 1      |


-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/uievents/issues/346#issuecomment-1562912992
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/uievents/issues/346/1562912992@github.com>

Received on Thursday, 25 May 2023 13:30:11 UTC