Open garykac opened 7 years ago
It seems like we'd need some kind of loop in there to handle the case where I hold down a key and don't let it go until several characters have been entered. That should trigger at least a few input events, I'd think?
Regarding integration with the input/composition events, my instinct would be to start with one big all-together algorithm then try to refactor if possible.
Draft proposal for an algorithm to specify how keyboard, input and composition events are fired:
https://docs.google.com/document/d/1LJQvjEmWZGzVgZnofpvdkxMj1hEnLniD72XD4DLJWx4/edit?usp=sharing
Since it's more complicated than simply:
For example, see https://github.com/whatwg/html/issues/2605 which talks about inconsistencies in how UAs treat key presses in
Also cover how key events are handled during composition.
Starting proposal (needs to be verified):
global_state: inComposition = False