camera keystroke binding issue

Hello,

I’ve bound my camera movement to keystrokes as found in this Sandcastle:

But when I enter the text/address input box and type words with letters that have key bindings associated with them…the camera moves. How can I avoid this?

best,

Vanessa

Fixed my own problem if anyone needs help with the same thing. Added a hover detect on the div element (jquery) that contains the text box and then limited the keystrokes using that hover detection:

changed this code:

if (flags.moveForward) {

camera.moveForward(moveRate);

}

if (flags.moveBackward) {

camera.moveBackward(moveRate);

}

if (flags.moveUp) {

camera.moveUp(moveRate);

}

if (flags.moveDown) {

camera.moveDown(moveRate);

}

if (flags.moveLeft) {

camera.moveLeft(moveRate);

}

if (flags.moveRight) {

camera.moveRight(moveRate);

}

});

to this:

if ((flags.moveForward) && !($("#pac-input").is(’:hover’))) {

camera.moveForward(moveRate);

}

if ((flags.moveBackward) && !($("#pac-input").is(’:hover’))) {

camera.moveBackward(moveRate);

}

if ((flags.moveUp) && !($("#pac-input").is(’:hover’))) {

camera.moveUp(moveRate);

}

if ((flags.moveDown) && !($("#pac-input").is(’:hover’))) {

camera.moveDown(moveRate);

}

if ((flags.moveLeft) && !($("#pac-input").is(’:hover’))) {

camera.moveLeft(moveRate);

}

if ((flags.moveRight) && !($("#pac-input").is(’:hover’))) {

camera.moveRight(moveRate);

}

});