-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Opening a Window on keyboard_input.just_pressed makes it trigger again #12273
Copy link
Copy link
Closed
Labels
A-InputPlayer input via keyboard, mouse, gamepad, and morePlayer input via keyboard, mouse, gamepad, and moreA-WindowingPlatform-agnostic interface layer to run your app inPlatform-agnostic interface layer to run your app inC-BugAn unexpected or incorrect behaviorAn unexpected or incorrect behaviorS-Needs-InvestigationThis issue requires detective work to figure out what's going wrongThis issue requires detective work to figure out what's going wrong
Metadata
Metadata
Assignees
Labels
A-InputPlayer input via keyboard, mouse, gamepad, and morePlayer input via keyboard, mouse, gamepad, and moreA-WindowingPlatform-agnostic interface layer to run your app inPlatform-agnostic interface layer to run your app inC-BugAn unexpected or incorrect behaviorAn unexpected or incorrect behaviorS-Needs-InvestigationThis issue requires detective work to figure out what's going wrongThis issue requires detective work to figure out what's going wrong
Bevy version
0.13[Optional] Relevant system information
Windows 11What you did
I made a system similar to the one in the
keyboard_inputexample. But on the check whether the keyAwas just pressed, I then spawn a window.What went wrong
It spams opening new windows, the
just_pressedis held for multiple frames.I think this happens because it opens a new window, thus the focus is on the new window and the press counts as a new press?