Keyboard class without lwjgl?

Started by frostyfrog, July 13, 2011, 03:18:23

Previous topic - Next topic

frostyfrog

Hi, I was following the tutorials on her and I really do like lwjgl. But for my first few tests with making games in java, I would like to stick to mainly using awt and no external libraries. The first problem that I encountered was the keys repeating when using the keyPressed function. The keys worked so well when I used lwjgl.

So my question is, is it possible to use the keyboard class from lwjgl, without using lwjgl? Or could anyone point me in the right direction to re-implementing it's function?

Thanks! =D

kappa

Quote from: frostyfrog on July 13, 2011, 03:18:23
So my question is, is it possible to use the keyboard class from lwjgl, without using lwjgl? Or could anyone point me in the right direction to re-implementing it's function?

You can't use the Keyboard class standalone from LWJGL since its tied directly to the native display window. Its possible to read keys with AWT without them repeating, just google for some tutorials on it.