Running the above HTML file (see pen), and composing an à on my Mac keyboard (Alt-`, a) I get the following results:
Gecko | Chromium | WebKit |
---|---|---|
keydown : 18 |
keydown : 18 |
keydown : 18 |
keydown : 192 |
keydown : 229 |
compositionstart : 0 |
compositionstart : undefined |
compositionstart : undefined |
compositionupdate : ` |
compositionupdate : ` |
compositionupdate : ` |
keydown : 229 |
compositionupdate : à |
keydown : 229 |
compositionend : à |
compositionend : à |
compositionupdate : à |
keydown : 229 |
| `compositionend`: à |
I'm using keyCode
instead of key
because WebKit. The differences between the keydown
values are not that important. The
difference in event order, and the fact that Firefox triggers no keydown
after composition is initiated, Chrome gives you one in the middle, and Safari throws in an extra one at the end is fun!
Hey @darobin, what party is responsible for what actions trigger the composition events? One would think the emoji inputs (such as Windows 10 or on mobile devices) would trigger this - but they don't. Who should I mention this to?