-
-
Notifications
You must be signed in to change notification settings - Fork 191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Enter key in enum Keys #2263
Comments
Hi @yongsooim, It's definitely desirable to know when the "enter" key is/was pressed. I'll add this to our priorities for the next release. Did you find a workaround by chance? |
Thank you! I used event method like this for the workaround : let enterWasPressed = false
anActorInTheCurrentScene.onInitialize = (game) => {
game.input.keyboard.on("press", (evt) => {
if (evt.value == "Enter") {
enterWasPressed = true
}
}
}
anActorInTheCurrentScene.update(){
if(enterWasPressed){
//enter pressed tested
enterWasPressed = false
}
} |
Context
I want to test wasPressed(key: Keys) for the enter key, but there is no enum value "Enter" in enum Keys.
Without this, I have to use event method but I want the consistency with other keys.
Proposal
Add Enter key in enum Keys
The text was updated successfully, but these errors were encountered: