Keyboard input work in editor while I run games

Godot Version

V4.3 stable

Question

I’m new at GOdot and I have a issue with the keyboard control on game.
I’ve start to dev a game and I setup all the key in the Project settings and also in the code. But when I lauch a game, all the keyboard key work fine but on the editor behind even though I have the game lauch in front. I tried to click on it, minimize the editor, … but nothing work. It isn’t work only with the keyboard key, because with mouse’s buttons it’s work well.

the function for change direction but not walk :

the settings for the action ( teh mouse button is for the test. and it work) :

Thanks !

2 Likes

I have the same issue and I can’t find an answer to it. I hope somebody finds a way :frowning:

This is an annoying issue which I doubt will have an easy resolution.
If you are using a lot of printable character keys in testing then you will have to close the script window so you aren’t overwriting any code.
Alternatively, you could create a text file and switch to that when you test run and all those keypresses will be typed into the text file.
For movement I use the arrow keys with the idea that upon completion I can switch to WASD keys. The arrow keys don’t overwrite script.
Sorry, crappy solutions at best.
We could use a “lock-script and run” option.