XboxMouse: Control Your PC Using an Xbox Controller

Quick Reference

Combination Action
right joystick mouse movement, timed repeat rate dependent on value
left joystick mouse movement, pixel movement dependent on value
left joystick btn hold + left/right or hat left-right for Alt-Tab (switch program)
right joystick btn open Google
left trigger Alt-F4 (close)
X+left trigger scroll wheel
right trigger ** currently not functional - libsdl problem **
A left click
B right click
X middle click
Y enter
A + Y Alt-F4 (close) (alternate)
black volume up
white volume down
black + white pause/play
back previous track
start next track
back + start mute/unmute
hat arrow keys (with repeat rate)
A+hat mouse movement, one pixel
B+hat page up/down, browser prev/next

Get It

Download here.

Installation and Usage

Install Python 2.3 (for Windows).

Install pygame 1.6 Win32 for Python 2.3.

Run xboxmouse.py. Refer to the quick reference above for what you can do.

Joystick Sharing over TCP/IP

Do you have a 2-port Xbox-to-PC adapter, two controllers, and two PCs? If so, joystick sharing will enable you to use the a joystick on each computer; therefore you will not need to buy another Xbox-to-PC adapter.

The first joystick sharing program ever (as far as I know), XboxMouse lets you share a second joystick over TCP/IP. To do this, attach two joysticks to one computer. Open xboxmouse.py and make sure there is a line jserver = None. Run Xboxmouse. It will wait for a client to connect to receive input from the second joystick.

On the second computer, change the jserver = in xboxmouse.py line to have the IP address of the first computer. For example: jserver = "192.168.0.16". Run Xboxmouse and have connect. Both joysticks should now work, but cursor movement doesn't work too well because of network lag, although buttons should work fine.

Other Programs

XboxMouse isn't the only program that lets you use your joystick as a mouse. There are other, more comprehensive programs. Some are free, some not. They are listed here for informational purposes only.

Contact

Questions/comments should be directed to jeffconnelly [AT] users.sourceforge.net.