I initially bought an Xbox 360 controller to use with emulators. I found out that not only does it perform the task of mimicking an SNES controller admirably, but with a free program you can use it in place of a traditional mouse. While this might not seem practical, it is handy when you don't have a suitable surface to use a regular mouse on. For example, when the computer you need to operate is hooked up to the TV in your living room running a bunch of emulators. Using a mouse on a couch is harder than you'd think. Also, you can actually navigate Windows more easily by assigning common keyboard shortcuts (such as Alt + F4) to buttons. It's also just a quick, easy project to waste 15 minutes doing.
If this sounds good to you, jump to the next page to find out what you'll need.
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: What You Need (Hardware)
Surprisingly enough, to use an Xbox 360 controller as a mouse on a computer you need both an Xbox 360 controller and computer. More specifically:
A computer running Windows XP or Vista. Unfortunately, the drivers Microsoft provides are not for earlier versions of Windows. The computer will need one open USB port.
An Xbox 360 wired controller. This costs $40 retail, but you should be able to find it for around $20 online. If you don't already have a wireless controller or you only have one (and want another controller for multiplayer games on your Xbox 360) then the wired controller is the better choice.
An Xbox 360 wireless controller AND an Xbox 360 wireless gaming receiver. The wireless controller retails at $60, but again online you should be able to find it for half price. The wireless receiver costs $20 pretty much wherever you buy it. This option is the way to go if you already have a wireless controller or two as it only costs $20.
Now that you have all the hardware, we move onto the software.
Step 2: What You Need (Software)
The necessary drivers can be downloaded from Microsoft's website. This will allow you to use the controller for compatible games, but that's about it. That's not good enough for us. We want more, damn it!
JoyToKeyJoyToKey is the next and last bit of software we'll need. Scroll down to very end of the page to start the download.
Now that we have everything we need, let's set everything up.
Step 3: Installation
Run the application you downloaded from Microsoft. Read the agreement, click "I accept this agreement", click "Next", let the program install, and click "Finish". After you've installed this, plug your controller (or wireless receiver) in and press the Guide button to make sure everything is copacetic.
JoyToKey doesn't need to be installed. Just extract the files from the .zip into whichever directory you want.
Now that everything is installed, it's time to get to the good part.
Step 4: JoyToKey Basics
Make sure your controller is connected and open JoyToKey. The left hand side displays your configurations. You can multiple configurations to use for certain tasks (one for mouse movement, one for gaming, etc.). On the right hand side you'll see a long list that consists of "Button", "Keyboard", "Auto". This is where you define what the buttons (thumbsticks and directional pads count too) do. However, by default this list doesn't show every component of the Xbox 360 controller.
Click the tab on the very right labeled "Others". Here you can change the number of joysticks for this configuration. Adding more joysticks to configure allows the same customization of a separate configuration, but the you can only switch to different joystick configurations (Joystick 1, Joystick 2, etc.) temporarily (while a button is held down) where you can toggle between configurations (press once to switch, press again to switch back). To view the full range of buttons of the Xbox 360 controller click "Use Axes other than X and Y." and "Use POV switches".
Now, push the "Joysticks" tab to switch back to the list. You'll notice a lot more buttons are available for us to configure. Here's a rundown of what each button on the controller is listed as in the list.
Left Thumbstick Left = AxisX(<0)
Left Thumbstick Right = AxisX(>0)
Left Thumbstick Up = AxisY(<0)
Left Thumbstick Down = AxisY(>0)
Right Shoulder = Axis3(<0)
Left Shoulder = Axis3(>0)
Right Thumbstick Left = Axis4(<0)
Right Thumbstick Right = Axis4(>0)
Right Thumbstick Up = Axis5(<0)
Right Thumbstick Down = Axis5(>0)
Directional Pad Up = POV1:UP
Directional Pad Right = POV1:RIGHT
Directional Pad Down = POV1:DOWN
Directional Pad Left = POV1:LEFT
A = Button 1
B = Button 2
X = Button 3
Y = Button 4
Left Bumper = Button 5
Right Bumper = Button 6
Back = Button 7
Start = Button 8
Left Thumbstick = Button 9
Right Thumbstick = Button 10
(For clarification, the last two are achieved by pushing the left or right thumbstick in. They're called L3 and R3 on Playstation controllers, but I don't know if they have a name from Microsoft.)
There are plenty of other options, but what exactly they do I don't know. Using the guide above maps every button (except the Guide button) that I could find so I'm not worried.
The last step will give examples of configurations and provide the files that I use.
Step 5: Configuration and Implementation
From here you can configure the buttons manually, download the configurations I use, or do a little of both. To assign a value to a button you simply double click it in that list. You'll be presented with a bunch of options. "Disable" does just what it says. "Keyboard" allows you to assign a certain keystroke (or a combination of up to three keystrokes) to that button. "Mouse" allows you to move the mouse pointer, scroll wheel, and use the mouse buttons. "Command" does nothing at the moment. "Special" lets you speed up or slow down the movement of the pointer, temporarily use another joystick configuration, or switch to a different configuration.
I use two configurations (one for navigating Windows ("Windows.cfg") and one for playing games). You can download my Windows configuration at the bottom of the page here. It's made so the left thumbstick moves the pointer, A left clicks, B right clicks, X speeds up the pointer, left bumper is ALT, right bumper is TAB (I use these two together to switch between windows quickly), left trigger is ALT + SPACE + N (which minimizes a window), right trigger is ALT + F4 (which closes a window), right thumbstick scrolls up and down, and a few other buttons do things as well. The gaming configuration just mirrors the settings in SNES9X.
If you plan on using the controller as your primary input device it's important that you have JoyToKey run at startup. It has an option under "File", but I haven't had good luck with that. Instead I created a shortcut in the "Startup" folder. Then right clicked and chose "Properties". From there I changed "Run:" to "Minimized". This way not only will JoyToKey start every time Windows starts, but it'll start out of the way. (Note: I don't think a "Startup" folder is present on all computers, but you can still make JoyToKey run at startup by using msconfig. Do a search on how to use msconfig if you're not familiar with it.)
To use my configuration simply download it and put it in the root directory that JoyToKey is in. I recommend you download it, and then modify it to better suite your needs. Well, we've made it to the end. Thanks for reading, and let me know what you think.