Skip to content

Create instance of WindowEvent::KeyboardInput. #3176

Answered by kchibisov
TornaxO7 asked this question in Q&A
Discussion options

You must be logged in to vote

This is so cursed...

Why not just use a logical_key? Maybe some other state you actually need instead of doing synthetic event like that.

I could think of creating such events for testing purposes, and hide the platform_specific field for tests, but not sure what to do with general code, since platform specific fields sometimes are required...

I'd just suggest to not do what you're doing in this example, since there's clearly some abuse going on.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@TornaxO7
Comment options

Answer selected by TornaxO7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants