Hello Guest

Keyboard class without lwjgl?

  • 1 Replies
  • 3736 Views
Keyboard class without lwjgl?
« on: July 13, 2011, 03:18:23 »
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

*

Offline kappa

  • *****
  • 1313
Re: Keyboard class without lwjgl?
« Reply #1 on: July 13, 2011, 08:34:15 »
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.