The condition Any key pressed stops working whenever changing tabs

(The title already tells the problem)

Steps:

  1. I’m using the web version.
  2. I insert the conditions: “Any key pressed” + “Trigger once”
  3. I preview the game.
  4. I click any key and it works.
  5. I switch to gdevelop tab and back to preview.
  6. The “Any key pressed” + “Trigger once” will not work anymore, it wont return true.

Edit again:

At the same time of these (several) tests, I made “b key is pressed” + “Trigger once”, did the same thing and it will continue working, meanwhile the “Any key pressed” + “Trigger once” will stop working.

More edits:

Just to be clear, I am changing tabs while the keys are not being pressed.

Could not replicate with these events on the web version:

Could you share the exact events you used, and what method exactly you use to switch between the game and the editor? (Alt-tab, clicking the window, clicking the tab, keyboard tab switching button, …)

I got what is happening, I change tabs using LCtrl + tab number, so since LCtrl is being held, it will remain held when I return to the preview :confused:

1 Like