I have tried many different methods to make an Arduino based human interface device (AAC keys, gobetwino, Java robot class) But the best way I found to work really well is using the PS/2 library. I hope my project helps those interested in making their own game controllers:)
Basically I used the ps2dev library and created a keyboard object that simulates a ps/2 keyboard and to make it work with my computer I used an off-the-shelf PS/2 to USB converter for 3 bucks.
The HID "platform" works for linux, mac and windows with any games or software
Here are some images:
I took a video of playing some games with it and generating keypresses:
Very cool! I tried to use a Wii remote for quite sometime and couldn't get the bluetooth to connect reliably. This would be a good alternative. I have a PS/2 USB converter lying around. I'll give it a try sometime. Possibly with my joystick, which has two analog dimensions and one click button.
Thanks Mienaart! Actually I spend this whole summer trying out different ways for achieving this. So I realized there are four ways to do so:
1)Emulating a USB device through another micro-controller like Teensy
2)Sending data through Arduino's serial communication to a program such as AACkeys, gobetwino, or a processing sketch running Java Robot class (not so portable and doesnt work with all OSs and games)
3)PS/2 protocol then PS/2 to USB converter like this project
4)connecting a USB cable's device end to a circuit controlled by the Arduino
I tried out 1, 2 and 3 and found 3 to work the best and with the cheapest non-arduino component.
I want to share this summer's knowledge because I really want to see Arduino hobbyists creating awesome game controllers which are way better that whats out there
I put up a video on YouTube showing a Nintendo DS touchscreen being used to trigger USB-HID events so it could be used as a custom game controller. It's in the later part of this video: