-
Notifications
You must be signed in to change notification settings - Fork 592
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
Each Enter or Backspace key press will repeat several times in GLFW. #26
Comments
This is probably related to #14, as before the PR when a mouse button was clicked, it wasn't consumed. I'm assuming the same is the case with keyboard input (I've not done anything related to editable text yet, so can't confirm this statement yet). The key is "down" in the nk_context even though it is already consumed by the text input, but will remain in that state until the key up event is called. This could potentially be solved the same way as mouse input; by adding a bool per key that is reset when the key is released and set when the key is consumed. |
Has this problem not been solved yet? |
I think glfw might be the problem here. Nuklear uses glfw char callbacks for normal characters. Special characters like backspace and up key are not reported in the glfw char callback. So Nuklear uses glfwGetKey for all special characters, which is called every time nk_glfw3_new_frame() is called. And when special characters are held down, nk_edit_string() modifies the string in the textbox everytime that it is called. Solutions: |
@telephone001 thanks! We maintainers & devs are fully booked in our lifes so any help is highly appreciated. |
I'm using GLFW 3.3 with GL3 backend under MacOS v10.15.1.
In TextEditor, each Enter or Backspace key press will generate several key press events which makes the TextEditor nearly unusable.
I compiled nuklear with below defines:
How to fix it?
The text was updated successfully, but these errors were encountered: