Created
April 9, 2013 04:27
-
-
Save MikeMcChillin/5342967 to your computer and use it in GitHub Desktop.
Arrow Key Functions
This file contains hidden or 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
document.onkeydown = (event)-> | |
left = 37 | |
up = 38 | |
right = 39 | |
down = 40 | |
switch event.keyCode | |
when left then | |
when right then | |
when up then | |
when down then |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment