LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: psiegel on May 13, 2004, 18:32:45

Title: Keyboard bug in linux
Post by: psiegel on May 13, 2004, 18:32:45
I noticed that after quitting a LWJGL app in linux, the autorepeat on my keyboard is shut off, despite the fact that it was on before running.  This is most notable by simply writing some text in a console after running LWJGL and then holding down the backspace key.  Only the last character gets deleted.

Anyway, it's easy enough for me to turn it back on afterwards using "xset r on", but I think LWJGL really ought to revert the user's system to the state it was originally in before running on quit.

Paul
Title: Keyboard bug in linux
Post by: elias on May 14, 2004, 04:55:28
Actually LWJGL does reset the autorepeat setting. Are you destroying everything correctly?

- elias
Title: Keyboard bug in linux
Post by: vrm on May 14, 2004, 08:48:35
It use to appear when Keyboard.destroy(); is not called
Title: Keyboard bug in linux
Post by: psiegel on May 14, 2004, 16:35:14
I usually don't notice it until after a long session of debugging, so it's entirely possible that I have crashed out of my own application and things have not been cleaned up properly.  I do call Keyboard.destroy() when my app exists, but like I said, I might not be exiting cleanly.

I shall do some more discrete tests and return with details.

Paul
Title: Keyboard bug in linux
Post by: elias on May 14, 2004, 17:07:08
Yeah well, that's generally the problem on X. Some settings are both global and permanent changed, like display mode changes and the keyboard repeat rate (which is turned off because I haven't found a better way to filter out the KeyDown/KeyUp events generated from holding down a key). Some kind of crash handler cleaning up things could probably be developed, but I haven't got around to do it yet.

- elias
Title: Keyboard bug in linux
Post by: psiegel on May 15, 2004, 12:46:40
Ran some tests, it does appear to only happen when I crash/force quit out.  Normal closure does return the keyboard to the correct state.  Sorry for the incorrect bug report.

Paul
Title: Keyboard bug in linux
Post by: princec on May 16, 2004, 10:44:28
We've known about that one for a while now :) Does anybody know how to do an "on unload" callback for a .so on Linux?

Cas :)