diff --git a/src/input.c b/src/input.c index de4ed793..85982419 100644 --- a/src/input.c +++ b/src/input.c @@ -154,9 +154,6 @@ void _glfwInputKey(_GLFWwindow* window, int key, int scancode, int action, int m void _glfwInputChar(_GLFWwindow* window, unsigned int character) { - if (character == -1) - return; - if (character < 32 || (character > 126 && character < 160)) return; diff --git a/src/x11_window.c b/src/x11_window.c index 72c79ab1..604b3077 100644 --- a/src/x11_window.c +++ b/src/x11_window.c @@ -520,7 +520,11 @@ static void processEvent(XEvent *event) _glfwInputKey(window, key, event->xkey.keycode, GLFW_PRESS, mods); if (!(mods & GLFW_MOD_CONTROL) && !(mods & GLFW_MOD_ALT)) - _glfwInputChar(window, translateChar(&event->xkey)); + { + const int character = translateChar(&event->xkey); + if (character != -1) + _glfwInputChar(window, character); + } break; }