[SOLVED] What is the enter key called

I am trying to use the enter key for my keypressed input but it keeps saying that “enter” is not a function. What is the key called?

Hey @Owen! Welcome to the forum. Share the code please so we can help.

if ((key === “enter”) (project.isHover === 4)) {
project.playerOne = 4;
project.gotoAndStop(3);
}
I have defined every variable it just says that “enter” is not a function in keypressed

try to use this:

if(isKeyDown('enter') && project.isHover===4){
project.playerOne=4;
project.gotoAndStop(3);
}

thank you so much! it works!

1 Like