diff --git a/Tetris/js/controller.js b/Tetris/js/controller.js index 6e3fee5..136c286 100644 --- a/Tetris/js/controller.js +++ b/Tetris/js/controller.js @@ -6,6 +6,12 @@ document.body.onkeydown = function( e ) { 38: 'rotate', 32: 'drop' }; + var keys = { + 68: 'left', + 65: 'right', + 83: 'down', + 87: 'rotate', + }; if ( typeof keys[ e.keyCode ] != 'undefined' ) { keyPress( keys[ e.keyCode ] ); render(); diff --git a/index.html b/index.html index 4941cfa..1775d43 100644 --- a/index.html +++ b/index.html @@ -15,4 +15,4 @@
- + \ No newline at end of file