Search JavaScript code of all Worlds for: keycode
if (event.keyCode == 13){
document.getElementById('me').onkeydown = function(event) { if (event.keyCode == 13) sendchat(); };
const me = document.getElementById('me').onkeydown = function(event) { if (event.keyCode == 13) sendchat(); }; function ourKeys ( event ) { return ( KEYS.includes ( event.keyCode ) ); } if ( event.keyCode == KEY_UP ) // move a bit along angle we are facing if ( event.keyCode == KEY_LEFT ) // rotate in place if ( event.keyCode == KEY_RIGHT )
if (e.keyCode == 37) moveLogicalAgent ( ACTION_LEFT ); if (e.keyCode == 38) moveLogicalAgent ( ACTION_DOWN ); if (e.keyCode == 39) moveLogicalAgent ( ACTION_RIGHT ); if (e.keyCode == 40) moveLogicalAgent ( ACTION_UP ); if (e.keyCode == 32) moveLogicalAgent ( ACTION_JUMPFORWARD); //cheat code to jump
if (keyCode === LEFT_ARROW) else if (keyCode === RIGHT_ARROW) if (keyCode === DOWN_ARROW && deg == 360)
if (e.keyCode == 37) player.movement = -1; if (e.keyCode == 39) player.movement = 1; if (e.keyCode == 37 && player.movement == -1) player.movement = 0; else if (e.keyCode == 39 && player.movement == 1) player.movement = 0;
if (e.keyCode == 32) if (e.keyCode == 37) if (e.keyCode == 38) if (e.keyCode == 39) if (e.keyCode == 40)
if (event.keyCode === 13 && !promptSubmitBtn.disabled) { var code = e.which || e.keyCode; if (event.keyCode === 13) {
return(OURKEYS.includes(event.keyCode)); if(event.keyCode == 65) socketSender(ACTION_LEFT, 1); if(event.keyCode == 87) socketSender(ACTION_DOWN, 1); if(event.keyCode == 68) socketSender(ACTION_RIGHT, 1); if(event.keyCode == 83) socketSender(ACTION_UP, 1);
switch ( event.keyCode ) { switch( event.keyCode ) {
if (e.keyCode == 37) if (e.keyCode == 38) if (e.keyCode == 39) if (e.keyCode == 40) if (e.keyCode == 83)
function ourKeys(event) {return(OURKEYS.includes(event.keyCode));} if ( event.keyCode == 49 ) {selectBall(0);} else if ( event.keyCode == 50 ) {selectBall(1);} else if ( event.keyCode == 51 ) {selectBall(2);} else if ( event.keyCode == 52 ) {selectBall(3);}
var code = a.keyCode; if (e.keyCode == 37) { moveLogicalAgent ( ACTION_LEFT ); e.preventDefault(); } if (e.keyCode == 38) { moveLogicalAgent ( ACTION_DOWN ); e.preventDefault(); } if (e.keyCode == 39) { moveLogicalAgent ( ACTION_RIGHT ); e.preventDefault(); } if (e.keyCode == 40) { moveLogicalAgent ( ACTION_UP ); e.preventDefault(); }
document.getElementById('me').onkeydown = function(event) { if (event.keyCode == 13) sendchat(); };
if (e.keyCode == 37) // left if (e.keyCode == 39) // right if (e.keyCode == 38) // down if (e.keyCode == 40) // up if (e.keyCode == 97) // numpad1 is putt
switch ( event.keyCode ) { switch( event.keyCode ) {
document.getElementById('me').onkeydown = function(event) { if (event.keyCode == 13) sendchat(); };
// All keyboard stuff - Whats important here is the event.keyCode listeners which check for arrow keys for movement -> letter keys fo // Array with keycodes for arrow keys, so we can quickly check if the input is one of them. keyboard[event.keyCode] = true; if (arrowKeys.includes(event.keyCode)) { } else if (typeFlag === 1 && event.keyCode === 13) {
return(OURKEYS.includes(event.keyCode)); if(event.keyCode == KEY_A) sendData(KEY_A, 2); if(event.keyCode == KEY_W) sendData(KEY_W, 2); if(event.keyCode == KEY_D) sendData(KEY_D, 2); if(event.keyCode == KEY_LEFT)
if (event.keyCode == 13) {
if (e.keyCode == 37) moveLogicalAgent ( ACTION_LEFT ); if (e.keyCode == 38) moveLogicalAgent ( ACTION_DOWN ); if (e.keyCode == 39) moveLogicalAgent ( ACTION_RIGHT ); if (e.keyCode == 40) moveLogicalAgent ( ACTION_UP );
document.getElementById('me').onkeydown = function(event) { if (event.keyCode == 13) sendchat(); };
switch (event.keyCode) { switch (event.keyCode) {
switch (e.keyCode){
if (e.keyCode == 37) moveLogicalAgent( ACTION_LEFT ); if (e.keyCode == 38) moveLogicalAgent( ACTION_DOWN ); if (e.keyCode == 39) moveLogicalAgent( ACTION_RIGHT ); if (e.keyCode == 40) moveLogicalAgent( ACTION_UP ); if (e.keyCode == 32) // if the keycode is space.
if (e.keyCode == 37) moveLogicalAgent ( ACTION_LEFT ); if (e.keyCode == 38) moveLogicalAgent ( ACTION_DOWN ); if (e.keyCode == 39) moveLogicalAgent ( ACTION_RIGHT ); if (e.keyCode == 40) moveLogicalAgent ( ACTION_UP ); if (e.keyCode == 32) // if the keycode is space.
if (e.keyCode == 37) moveLogicalAgent ( ACTION_LEFT ); if (e.keyCode == 38) moveLogicalAgent ( ACTION_DOWN ); if (e.keyCode == 39) moveLogicalAgent ( ACTION_RIGHT ); if (e.keyCode == 40) moveLogicalAgent ( ACTION_UP ); if (e.keyCode == 65) moveLogicalAgent ( JUMP_LEFT );
keyboard[event.keyCode] = true; keyboard[event.keyCode] = false;
if((e.keyCode == 38) || (e.keyCode == 40)) if(e.keyCode == 37 || e.keyCode == 39) if(e.keyCode == 37 || e.keyCode == 39) switch ( event.keyCode ) { switch( event.keyCode ) {
document.getElementById('me').onkeydown = function(event) { if (event.keyCode == 13) sendchat(); };
keyboard[event.keyCode] = true; keyboard[event.keyCode] = false;
var code = a.keyCode; if (e.keyCode == 37) { moveLogicalAgent ( ACTION_LEFT ); e.preventDefault(); } if (e.keyCode == 40) { moveLogicalAgent ( ACTION_DOWN ); e.preventDefault(); } if (e.keyCode == 39) { moveLogicalAgent ( ACTION_RIGHT ); e.preventDefault(); } if (e.keyCode == 38) { moveLogicalAgent ( ACTION_UP ); e.preventDefault(); }
if((e.keyCode == 38) || (e.keyCode == 40)) if(e.keyCode == 37 || e.keyCode == 39) if(e.keyCode == 37 || e.keyCode == 39) switch ( event.keyCode ) { switch( event.keyCode ) {
function ourKeys ( event ) { return ( OURKEYS.includes ( event.keyCode ) ); } if ( event.keyCode == 37 ) moveLogicalAgent ( ACTION_LEFT ); if ( event.keyCode == 38 ) moveLogicalAgent ( ACTION_DOWN ); if ( event.keyCode == 39 ) moveLogicalAgent ( ACTION_RIGHT ); if ( event.keyCode == 40 ) moveLogicalAgent ( ACTION_UP );
if (event.keyCode == 37) // If the left arrow is clicked then move the selector left else if (event.keyCode == 38) // If the up arrow is clicked then move the selector up else if (event.keyCode == 39) // If the right arrow is clicked then move the selector right else if (event.keyCode == 40) // If the down arrow is clicked then move the selector down else if (event.keyCode == 13) // If the Enter key is clicked then check what the user wants
if (e.keyCode == 37) moveLogicalAgent ( ACTION_LEFT ); //left arrow key if (e.keyCode == 38 && jump1 == false) //up arrow key if (e.keyCode == 39) moveLogicalAgent ( ACTION_RIGHT ); //right arrow key if (e.keyCode == 66) moveLogicalAgent ( ACTION_DOWN ); //"b"key if (e.keyCode == 32) //speace bar key fires bullets
if (e.keyCode == 37) { moveLogicalAgent ( ACTION_LEFT ); e.preventDefault(); } if (e.keyCode == 38) { moveLogicalAgent ( ACTION_DOWN ); e.preventDefault(); } if (e.keyCode == 39) { moveLogicalAgent ( ACTION_RIGHT ); e.preventDefault(); } if (e.keyCode == 40) { moveLogicalAgent ( ACTION_UP ); e.preventDefault(); } if (e.keyCode == 32) { moveLogicalAgent ( ACTION_JUMP ); e.preventDefault(); }
var code = event.keyCode;
if (e.keyCode == '38') else if (e.keyCode == '40') else if (e.keyCode == '37') else if (e.keyCode == '39') else if (e.keyCode == '13')
if (e.keyCode == 37) moveLogicalAgent ( ACTION_LEFT ); else if (e.keyCode == 38) moveLogicalAgent ( ACTION_DOWN ); else if (e.keyCode == 39) moveLogicalAgent ( ACTION_RIGHT ); else if (e.keyCode == 40) moveLogicalAgent ( ACTION_UP ); else if (e.keyCode == 17) moveLogicalAgent ( ACTION_PAUSE ); // ctrl to mute