Skip to content

Instantly share code, notes, and snippets.

@emilwidlund
Last active August 1, 2017 12:38
Show Gist options
  • Select an option

  • Save emilwidlund/6d993ed4a3fa63a8af63d02cb3b2d66a to your computer and use it in GitHub Desktop.

Select an option

Save emilwidlund/6d993ed4a3fa63a8af63d02cb3b2d66a to your computer and use it in GitHub Desktop.
Gamepad.on 'gamepadevent', (e) ->
switch e.keyCode
when 39
print 'Stick going right'
when 37
print 'Stick going left'
when 40
print 'Stick going down'
when 38
print 'Stick going up'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment