Java using an Xbox controller

In which library would you recommend connecting the Xbox 360 controller to Java and be able to read key inputs into the KeyPressed event as KeyEvent.

So, I would like something like this

private class KeyInputHandler extends KeyAdapter { public void keyPressed(KeyEvent e) { } } 

And I want all the controller clicks to go to keyPressed.

I would appreciate it even more if you could also provide good libraries for PS3 controllers.

+7
source share
1 answer

The XBox 360 wired controller will appear as a joystick on Windows, so a library such as JXInput will allow you to accept input from it.

Simple example

JXInput website

+6
source

All Articles