Skip to content

Instantly share code, notes, and snippets.

@gaving
Created January 31, 2010 16:24
Show Gist options
  • Save gaving/291133 to your computer and use it in GitHub Desktop.
Save gaving/291133 to your computer and use it in GitHub Desktop.
key: function(e) {
switch(e.charCode || e.keyCode) {
case 74: case 106: matrix.moveLeft(); break; // J
case 76: case 108: matrix.moveRight(); break; // L
case 75: case 107: matrix.moveDown(); break; // K
case 73: case 105: matrix.rotate(); break; // I
}
return false;
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment