kallaspriit/HTML5-JavaScript-Gamepad-Controller-Library — pull request #4 by lonewolfwilliams (2013-02-26 10:22:05+00:00)
Title: Added Button up and Button down events to Gamepad

Button up and button down events offer an alternative to polling the gamepad, the changes are as follows:

Added BUTTON_UP and BUTTON_DOWN events to Gamepad.Event
Added a previous state to the gamepad object
Added logic to _update to fire events when states change on the buttons
Added a couple of event handler bindings to index.html to demo functionality