chore(core): fix keydown/up handling for KMN keyboards
- Dominant language
- Pascal
- Stars
- 534
- Forks
- 143
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 113
Description
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](https://github.com/keymanapp/keyman/issues/15569#issuecomment-3926547119) 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
Contributor guide
Assessment
This issue has not been assessed yet.