Created
August 22, 2015 12:19
-
-
Save hoox/3b14c9f56e48a9e46aaf to your computer and use it in GitHub Desktop.
"Gamepad Connected/Disconnected" Event Listener
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.addEventListener("gamepadconnected", function(e) { | |
console.log(e.gamepad); | |
}); | |
window.addEventListener("gamepaddisconnected", function(e) { | |
console.log(e.gamepad); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment