Wednesday, July 4, 2012

Using the Xbox 360 Controller as a mouse on Windows

I wrote a small JNI library while I was learning how to use XInput for use in my Java games and to test it I wrote a little program that uses my Xbox 360 Controller for Windows as a mouse controller.

To use it, you need to have at least one Xbox 360 controller connected to your computer.

While the program is running:
  • Press Start on any connected controller to begin controlling the mouse cursor with that controller. Press Start again to stop.
  • Press Back to release the controller (the program will no longer accept input from it). Once all controllers are released, the program will terminate.
  • To move the mouse cursor, use the left stick.
  • Press A to left-click, B to right-click, and X to middle-click.
  • The analog triggers act as the scroll wheel. Left scrolls up, and right scrolls down.
  • Press and hold the shoulder buttons to alter the cursor and scroll movement speeds. Left slows down, and right speeds up.
Note that this only works in Windows, and only with Xbox 360 Controllers for Windows.

Download here: http://www.sendspace.com/file/ipigmh (if you have any suggestions for a better place to share files, please tell me in the comments!)

You may need to install the Microsoft Visual C++ 2010 redistributable packages as well:

No comments:

Post a Comment