Linux, X11: Enter key not seen at Char callback


#1

I added code in the Key callback to emit an event for Char 10, looks like this:

case GLFW_KEY_ENTER:
ImGui_ImplGlfwVulkan_CharCallback(window, 10);
break;

However this does not support key repeat.


#2

I’m not sure if you looking for help with dear imgui or with GLFW?

The enter key is already handled by imgui’s widgets, see the demo multi-line text input widget for an example.

In GLFW the enter key is not sent to the char callback. I think it could be argued that it should be (perhaps optionally), as a text file can include return characters. However at the moment the intention is that you should handle GLFW_KEY_ENTER yourself via the key callbacks or glfwGetKey().

if you need to implement repeat then you need to add code to do this. For an example see https://github.com/glfw/glfw/blob/master/src/input.c#L260-L279