Problem this feature should fix
Scripts can only check if a key is pressed or released, so there's no way to know which character was actually typed. Anything that takes text input (a name field, a chat box, a debug console) has to map key codes to characters by hand, which only works for one keyboard layout and can't handle accents or Caps Lock.
Holding a key doesn't repeat either: Window::BindKeyCallback ignores GLFW_REPEAT, so holding Backspace or an arrow key does nothing after the first press unless each script builds its own timer.
Expected solution
- Bind
glfwSetCharCallback and expose the characters typed during the frame, for example with Inputs.GetTypedText() returning them as a UTF-8 string.
- Forward
GLFW_REPEAT events, for example with Inputs.GetKeyRepeat(key) returning true when the key repeats during the frame
Problem this feature should fix
Scripts can only check if a key is pressed or released, so there's no way to know which character was actually typed. Anything that takes text input (a name field, a chat box, a debug console) has to map key codes to characters by hand, which only works for one keyboard layout and can't handle accents or Caps Lock.
Holding a key doesn't repeat either:
Window::BindKeyCallbackignoresGLFW_REPEAT, so holding Backspace or an arrow key does nothing after the first press unless each script builds its own timer.Expected solution
glfwSetCharCallbackand expose the characters typed during the frame, for example withInputs.GetTypedText()returning them as a UTF-8 string.GLFW_REPEATevents, for example withInputs.GetKeyRepeat(key)returning true when the key repeats during the frame