Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Key presses report "virtual" key presses (including repetition), not physical key down events #558

Closed
dylanede opened this issue Aug 2, 2015 · 3 comments

Comments

@dylanede
Copy link
Contributor

dylanede commented Aug 2, 2015

Glutin currently supports key press events and key release events. But (on Windows at least), key press events correspond to the virtual key presses that the OS does, including the repeated presses that occur when you hold the key down. I would really like to be able to get actual physical key down events as well, and distinguish between "presses" and key down events. At the moment, you can get more key press events than release events due to press repetition. I need this distinction for integration with the Chromium Embedded Framework, which has three types of key event - up, down and press.

The ElementState enum currently contains Pressed and Released. Ideally it would change to Pressed, Down and Up. This would be a breaking change, but easy to correct in user applications.

@dylanede
Copy link
Contributor Author

dylanede commented Aug 3, 2015

I would also like to add that this is not a blocking issue for CEF, since the behaviour can be emulated by tracking key state.

@Limeth
Copy link

Limeth commented Sep 3, 2016

I am not sure, but I think this also causes LAlt not to function on Windows.

@tomaka
Copy link
Contributor

tomaka commented Nov 3, 2016

Closing for rust-windowing/winit#52

@tomaka tomaka closed this as completed Nov 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants