You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docking branch @ 5f8c9ae (but probably valid for all branches)
GLFW / OpenGL3 back-end (unmodified)
Windows 10 / Visual Studio 2017 (up-to-date)
Compiled in Debug / Win64
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.
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:
This is the PR you are looking for #2005:
In the meanwhile you can hijack ImGui_ImplGlfw_KeyCallback() function to replace GLFW_KEY_KP_ENTER with GLFW_KEY_ENTER.
@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 ImGui_ImplGlfw_KeyCallback pointer, it works perfectly. Closing this issue, sorry for the inconvenience.
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.)
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: