This is all of our controller logic we use in the game LAZA KNITEZ!!.
It's pretty rough, but it helped us a lot. Basically all of our controller logic is abstracted from the game thanks to InputHelper.hx.
It works on OUYA (Xbox, ps3, ouya controllers), Windows native (Xbox controllers and keyboard) and flash (keyboard).
Hope this helps anybody. I wouldn't use it verbatim, cause it's rough, but it's full of useful details. Feel free to contact me if you need anything clarified.
https://gist.github.com/joonjoonjoon/f105e64029d32de76488