-
Notifications
You must be signed in to change notification settings - Fork 921
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
How to create instance of WindowEvent::KeyboardInput / KeyEvent #3606
Comments
I thought that it's a duplicate, but there's clear no issue about this. We'll likely need an API change. Probably You can also construct specific bits, like logical/physical key, which should be more or less sufficient for testing. |
I think either of those options would work. I was also wondering if the field value could be an option. Agreed, I can get quite a lot of mileage from the components, but it would be nice to be able to pass the whole event to a handler method. I assume any API changes now would be released with the trait API, or later? |
Similarly, for I suppose this holds for all of the data structures that can be received in events. There are of course other approaches, such as creating my own object and taking the necessary values from |
|
Does that mean the physical/logical key + location should be used for modifiers instead? If that's the case, when should |
If you want to detect a particular button press, use Modifiers could be changed without any button press at all. |
We've discussed it a bit with @madsmtm and I think the current way forward would be to try to make the The issue with making it |
I need (want) to created an instance of
WindowEvent::KeyboardInput
for testing purposes, but I can't becausekey_event.platform_specific
is private to me as a consumer.#3176 does not provide a solution.
How can I create an instance of this event?
The text was updated successfully, but these errors were encountered: