diff --git a/src/x11_init.c b/src/x11_init.c index 1c28e5f3..4659c153 100644 --- a/src/x11_init.c +++ b/src/x11_init.c @@ -48,7 +48,7 @@ static int translateKey(int keyCode) // Note: This way we always force "NumLock = ON", which is intentional // since the returned key code should correspond to a physical // location. - keySym = XkbKeycodeToKeysym(_glfw.x11.display, keyCode, 1, 0); + keySym = XkbKeycodeToKeysym(_glfw.x11.display, keyCode, 0, 1); switch (keySym) { case XK_KP_0: return GLFW_KEY_KP_0; @@ -68,6 +68,7 @@ static int translateKey(int keyCode) default: break; } + // Now try pimary keysym for function keys (non-printable keys). These // should not be layout dependent (i.e. US layout and international // layouts should give the same result). @@ -307,7 +308,7 @@ static void updateKeyCodeLUT(void) // lookups for (keyCode = 0; keyCode < 256; keyCode++) { - if (_glfw.x11.keyCodeLUT[keyCode] < 0) + //if (_glfw.x11.keyCodeLUT[keyCode] < 0) _glfw.x11.keyCodeLUT[keyCode] = translateKey(keyCode); } }