Hello LWJGL community,
I am currently working on some LWJGL tutorials and I ran across a weird bug with the Keyboard.getEventCharacter() method. When called after checking that a key was released (Keyboard.getEventKeyState == false), it seems to return a blank char that terminates string building. What I mean by this is that it does not return the Char that specifies the key released
AND it pre-terminates any string that was being built with the method call inside. For instance:
while(Keyboard.next()) {
if(Keyboard.getEventKeyState()) {
System.out.println("Keyboard Event: \"" + Keyboard.getEventCharacter() + "\" was pressed!");
} else {
System.out.println("Keyboard Event: \"" + Keyboard.getEventCharacter() + "\" was released!");
}
}
The output goes something like this:
Keyboard Event: "a" was pressed!
Keyboard Event: "
Keyboard Event: "d" was pressed!
Keyboard Event: "
Whenever i query the Keyboard.getEventCharacter() upon key releasing, there seems to be no char data available in the buffer to read. Thus a null is returned (I guess) or perhaps some special char? Either way, it pre-emptively cuts off the string but does not raise an Exception or throw a runtime error. It might have something to do with my keyboard or operating system, so here is some helpful info about my computer:
OS: Kubuntu 11.10 x64 (Linux Kernel: 3.0.0-16-generic)
Keyboard: Dell Keyboard KB212-B (Swiss DE Layout) via USB
Editor: Eclipse EE Version: 3.7.0 Build id: I20110613-1736
LWJGL: lwjgl-2.8.3
I am just wondering if this is intended behaviour; i.e. when a key is released, you cannot know which key it is; or if this is a problem of my OS/Hardware/Software; or a genuine bug of some sort.
Thanks for your patience!

EDIT: Fixed a bug in the above Java code.