From: Elias N. <eli...@us...> - 2005-04-19 07:18:31
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/linux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21027 Modified Files: org_lwjgl_input_Keyboard.c Log Message: Linux: If a keysym has no LWJGL mapping, try the unshifted keysym instead Index: org_lwjgl_input_Keyboard.c =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/org_lwjgl_input_Keyboard.c,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- org_lwjgl_input_Keyboard.c 13 Apr 2005 12:55:21 -0000 1.20 +++ org_lwjgl_input_Keyboard.c 19 Apr 2005 07:18:17 -0000 1.21 @@ -578,6 +578,11 @@ 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; } |