-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
Numpad Enter key is ignored when using ImGuiInputTextFlags_EnterReturnsTrue #2191
Comments
This is the PR you are looking for #2005: |
@ocornut thanks for the quick answer ! I only checked the issues, next time I'll think of checking the PR too :) And thanks for the |
It’s a real problem that needs to be fixed tho. I think short term I may just add those workaround in the callback, before we go on and add more keys to the enum. (I’d also like to tackle keyboard and shortcut inputs better that just adding keys to the enum.)
|
Note that this is now fixed by #2625. |
Umm, with this being fixed, is the TL;DR of how I'm supposed to a NumpadEnter to the KeyMap when ImGuiKey_Return or _NumpadEnter don't exist? Finally found it for anyone else: |
Configuration:
To explain the issue a bit further: when using an input with the
ImGuiInputTextFlags_EnterReturnsTrue
option flag, only the Enter key of the main part of the keyboard is actually working. Validating the input using the numpad Enter key doesn't work.The problem comes from here:
imgui/imgui_widgets.cpp
Line 3360 in 50c43d1
This only checks for one key value; however GLFW has 2 distinct values for those 2 Enter keys, thus only one of my keyboard's Enter keys is working.
If most implementations support 2 different values for those 2 enter keys, it might make sense to add a new value into the
ImGuiKey_
enum to handle this secondary Enter key ? If you have any idea as to how this should be handled (if it should) feel free to comment here, I can work on a fix and send a pull request for review :)The text was updated successfully, but these errors were encountered: