Closed pyfisch closed 5 years ago
I was wondering about this same issue, the docs for the Key::Char(String)
variant say
key string that corresponds to the character typed by the user, taking into account the user’s current locale setting, modifier state, and any system-level keyboard mapping overrides that are in effect.
Shouldn't Key::Char
provide the unmodified key? with KeyboardEvent
providing a way to get a modified string?
This line is copied from the specification. It should be the modified key so applications can use the character information. (Getting unmodified keys is kind of a special case because usually you either want the physical location or the character value and keyboard settings can be all weird so you should not make assumptions about the relation between the two)
current implementation is good enough
To implement: https://w3c.github.io/uievents/#determine-keydown-keyup-keyCode