Skip to content

Instantly share code, notes, and snippets.

@eric-wieser
Created May 29, 2012 22:16
Show Gist options
  • Select an option

  • Save eric-wieser/2831136 to your computer and use it in GitHub Desktop.

Select an option

Save eric-wieser/2831136 to your computer and use it in GitHub Desktop.
Javascript key mapping
var keys = {up: 38, right: 39, down: 40, left: 37}; for(var i = 65; i < 91; i++) keys[String.fromCharCode(i+32)] = i;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment