In order to support the fix for the below bug, I propose to change the "SFG_WindowState::KeyRepeating" variable from a GLboolean to an integer and store the code number of the repeating key in it. In "freeglut_main.c" around line 850 we would then check whether the current key has the same code as the repeating key and, if they do not match, set the "window->State.KeyRepeating" to -1 to indicate that there is no repeating key. The test on line 863 would be modified to check for equality with -1 and then the "window->State.KeyRepeating" variable would be set to the keycode somewhere around line 865, just before the "break" statement.
The Windows code does not use this variable and so no change would be required there.
Does anybody have any heartburn over this?
John F. Fay
Technical Fellow, Jacobs/Sverdrup TEAS Group
From: email@example.com [mailto:firstname.lastname@example.org] On Behalf Of Marius B
Sent: Wednesday, May 10, 2006 5:00 PM
Subject: [Freeglut-developer] Strange behaviour with keyboard callbacks
Recently I have moved my project from GLUT to freeglut, and now I experience very weird behaviour of keyboard callbacks. For example I move my camera acording to how long was some key pressed, that means I need to get KeyPress and KeyRelease events, and this works just fine, but when I start working with multiple keys, it works only about one secod. For example I press 'a' and then 'b' without releasing 'a', if time between these two presses are less than one second, both keys generates KeyPress/Release events, otherwise the second key wont generate KeyPress event, but when i release it, I get only KeyRelease event. So where is KeyPress event, and is there anything I could do about that?
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
Freeglut-developer mailing list