Investigating #15569 showed that we we might return different values for actions.emit_key after processing keydown and keyup events for LDML keyboards which might cause keys to get stuck. Further investigation showed that a similar behavior is happening with KMN keyboards, although there it is the reverse and so less likely to cause stuck keys.
However, it's still a smell and not right and might cause problems, so we should fix things for KMN keyboards as well, so that we always set the same value for actions.emit_key in keyup as we did for keydown.
Also, we should consider overlapping key events. See discussion in #15609.
Follows: #15609
Investigating #15569 showed that we we might return different values for
actions.emit_keyafter processing keydown and keyup events for LDML keyboards which might cause keys to get stuck. Further investigation showed that a similar behavior is happening with KMN keyboards, although there it is the reverse and so less likely to cause stuck keys.However, it's still a smell and not right and might cause problems, so we should fix things for KMN keyboards as well, so that we always set the same value for
actions.emit_keyin keyup as we did for keydown.Also, we should consider overlapping key events. See discussion in #15609.
Follows: #15609