From 953b7f52e549a7983da1971b7a0e33d956b515dd Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Thu, 4 Apr 2013 17:13:28 +0200 Subject: [PATCH] No characters from Ctrl and Alt chords. This makes the behavior on X11 consistent with Win32 and Cocoa. --- src/x11_window.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/x11_window.c b/src/x11_window.c index 00e9d42b..bdebae37 100644 --- a/src/x11_window.c +++ b/src/x11_window.c @@ -467,7 +467,13 @@ static void processEvent(XEvent *event) case KeyPress: { _glfwInputKey(window, translateKey(event->xkey.keycode), GLFW_PRESS); - _glfwInputChar(window, translateChar(&event->xkey)); + + if (!(event->xkey.state & ControlMask) && + !(event->xkey.state & Mod1Mask /*Alt*/)) + { + _glfwInputChar(window, translateChar(&event->xkey)); + } + break; }