glutin_window icon indicating copy to clipboard operation
glutin_window copied to clipboard

Unknown keys with valid scan codes are not handled.

Open thilokru opened this issue 5 years ago • 0 comments

I am working on a german keyboard and want to capture key events of the german umlaut ü. The following lines of code prevent this:

https://github.com/PistonDevelopers/glutin_window/blob/c9b89f3c8d60b5e8741c1700fd024b62c5ae4a91/src/lib.rs#L301 https://github.com/PistonDevelopers/glutin_window/blob/c9b89f3c8d60b5e8741c1700fd024b62c5ae4a91/src/lib.rs#L319

Here, in both cases, a valid virtual key code is required for the event to be fired (Some(key)). If this requirement is omitted (tested localy), an input event for the piston library can be thrown (of course with an unknown key, but valid scancode). This allows the user to handle previous unhandable key inputs.

If a change in that direction is desired, I can provide a pull request implementig this feature.

thilokru avatar May 26 '20 14:05 thilokru