Skip to content

how does the EventKeyboard class get the pressed key? #1163

Closed Answered by rh101
10100010010001001010 asked this question in Q&A
Discussion options

You must be logged in to vote

You haven't mentioned what it is exactly that you are attempting to achieve.

If you need to know how something works, then you have several options. The easiest would be to be to run the application, put a breakpoint on where the event is sent out, and look at the call stack from there. Follow the calls up to see where the information came from. The source of the input is most likely platform specific, so the calls that send out the events will change depending on which platform you're running the application on.

For example, this is one implementation:

void GLViewImpl::onGLFWKeyCallback(GLFWwindow* /*window*/, int key, int /*scancode*/, int action, int /*mods*/)
{
    // x-studio spec, f…

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
4 replies
@10100010010001001010
Comment options

@rh101
Comment options

@10100010010001001010
Comment options

@rh101
Comment options

Answer selected by 10100010010001001010
Comment options

You must be logged in to vote
3 replies
@10100010010001001010
Comment options

@aismann
Comment options

@DelinWorks
Comment options

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