mirror of
https://github.com/glfw/glfw.git
synced 2025-06-14 19:52:14 +00:00
X11 input fix for keypad issues.
This commit is contained in:
parent
363ec64321
commit
b04b98986a
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user