Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Character callback with modifiers that is ALWAYS invoked for chars with pressed mods #1618
It is currently not possible to receive character events with modifiers for all characters that were typed in.
My demo was: A user is typing in
My request basically is to let the character-with-mods callback know about ALL characters being typed in with all modifiers - it also feels like a bug to me that this callback isn't invoked on non-en_US keyboard layouts (my test-case: de_DE), so I'm not sure it actually is a bug or a feature request.
p.s.: I didn't find any resource telling me why
Many thanks in advance,
If you take a look at the issues for glfwSetCharCallback you'll see that it didn't work for the use-case you've described.
Basically a key press such as
However, the key combination
So the solution I proposed on the forum is that we need to extent glfwGetKeyName to be able to handle translations in the presence of modifier keys. So the new version would be something like:
Note that glfw would either have to ignore the CTRL mods, or users of the API would need to know that CTRL as a mod will result in no character. I would prefer the later as being more obvious.