var pressed = [],
left = 37,
up = 38,
right = 39,
down = 40;
addEventListener( 'keydown', function(ev) {
pressed[ev.keyCode] = 1;
} );
addEventListener( 'keyup', function(ev) {
pressed[ev.keyCode] = 0;
} );
addEventListener( 'load', function() { if (pressed[left] && pressed[up]) {/*...*/} } );