mirror of
https://github.com/hexahigh/games.git
synced 2025-12-11 20:15:38 +01:00
13 lines
276 B
JavaScript
13 lines
276 B
JavaScript
document.body.onkeydown = function( e ) {
|
|
var keys2 = {
|
|
65: 'left2',
|
|
68: 'right2',
|
|
83: 'down2',
|
|
87: 'rotate2',
|
|
};
|
|
if ( typeof keys2[ e.keyCode ] != 'undefined' ) {
|
|
keyPress2( keys2[ e.keyCode ] );
|
|
render();
|
|
}
|
|
};
|