Linux: If a keysym has no LWJGL mapping, try the unshifted keysym instead

This commit is contained in:
Elias Naur 2005-04-19 07:18:17 +00:00
parent cc8cff2d42
commit e6f8857439
1 changed files with 5 additions and 0 deletions

View File

@ -578,6 +578,11 @@ static unsigned char getKeycode(XKeyEvent *event) {
unsigned char keycode;
KeySym keysym = mapEventToKeySym(event);
keycode = mapKeySymToLWJGLKeyCode(keysym);
if (keycode == org_lwjgl_input_Keyboard_KEY_NONE) {
// Try unshifted keysym mapping
keysym = XLookupKeysym(event, 0);
keycode = mapKeySymToLWJGLKeyCode(keysym);
}
return keycode;
}