rust-windowing / glutin

A low-level library for OpenGL context creation
Apache License 2.0
1.98k stars 476 forks source link

Weird keyboard input #956

Closed InnocentusLime closed 6 years ago

InnocentusLime commented 6 years ago

Hello!

When I try to read input from keyboard using events, I can't detect if two of them are pressed in the same time. For exmaple, if I hold down arrow key and right arrow key, glium will detect that only the right arrow key is pressed. Is there any way to fix that issue?

InnocentusLime commented 6 years ago

Fixed the issue by creating an input system which tracks the key state using events. (When a key gets pressed, I set the corresponding bool value to true, and when I get notified that the key got released, I set that bool to false)