From what I gathered from the Ouya SDK docs, the Ouya SDK has some own methods for Gamepad input. You can't use the HTML5 Gamepad API, otherwise you could just get the Gamepad plugin that comes with the Jump'n'Run example.

But this plugin gives a good starting point for one that utilizes the Ouya SDK. If I understand the Ouya SDK docs correctly, you just need to set up some global functions onKeyUp, onKeyDown (which is weird, but ok) and you're good to go.

Note that this plugin totally ignores the controller (i.e. player1 or player2...). Each O-Button on each connected controller will trigger the 'jump'. If you don't want that, simply check if playerNum == 1 in the callbacks and return if it doesn't.

It works great on the ouya but the problem is that only player 1 works and I want the game to be controlled by any connected gamepad, is there anything I can edit so that the plugin ignores the controller (i.e. player1 or player2...). So that a button on each connected controller will trigger the 'jump' for example like mentioned posts above.