J2SE input or jinput ?

Hallo,

questions on keyboard/mouse within a Jogl application - to which forum do they fit best?

The control of the mouse and keyboard does irritate me a bit - from a point of games developer. Two questions please:

a) When I use the KeyListener registered to my GLCanvas, each key has got an initial delay and then a repeat. Great for typing within text editors (and such Swing components), but not for games.
Did I miss the right method to scan the keyboard?

b) In contrast to continuing key events when they’re being hold, hitting a mouse button does only fire one event (MousePressed / Typed / etc), but no event while the button is still being pressed?
Of course you can remember that is has been pressed, so that a polling TimerTask (or such) handles this information until the button is being released again.
So, do I really have to start an own TimerTask just to “poll” the mouse button? (Looks big to me for such a small task…)

So the final questions are: would Jinput help a lot? Or is it rather “just” for gamepads/controllers, which I would not need for my mouse driven application?
I looked into the CVS of Jinput but just found a very small text file. Is there an userguide? For Jogl I found a very very good one. http://jogl.dev.java.net/source/browse/jogl/doc/userguide/index.html
(thanks to the autors of it: it’s a very good start point!)

Furthermore: are there any good FAQs on the topic “Java for game developers” ?

Hi
Jinput is suposed to handle mouse, keyboard and joysticks/gamepads, under windows it works, macOS is comming, and I’m still strugling with the linux one, due to a number of reasons as described on the jinput list.

Basically, jinput is fun under windows, but it’s not there for any other platform yet.

Cheers

Endolf

Thanks for the clarification.
Sounds well. :slight_smile: