ENTER on texfield not working

Hello together, i’m new to GDevelop and have a first question…

At first, sorry for my probably bad english, i’m native german, but i hope you can understand me… :slight_smile:

long question short:
the first condition works, the second not… why?

i have a textfield for a playername.
to save the name, i have a “save-Button” next to the textfield and it works as expected.
now i want to give the player the chance to save the name by just pressing the “enter”/“return”-Key,
but it did not work…

cound you give me a hint?

I don’t know if there is a solution.
But the reason is that the TextInput object is rendered in a special way “outside of the game”.
Mousclick etc. will also not work in the input field, just like the cursor is on object condition.

i read about this problem,
but why is there the opportunity to trigger a “focussed”-action on an textfield when there is no chance to use it?

I think it would be helpful if there were 2 additional conditions. One for when “enter” is pressed like IsSubmitted. Another for when text is changed. Maybe submit a request.

I created a work around a while ago but I never thoroughly tested it. If you setup the object as multiple line (text area) it will accept the enter key. You then check for the NewLine() and remove it. I added the angle action just to test it. Although, that’s the only testing I’ve done.

More safeguards might be needed. I used 2 substrings just in case the enter key is pressed in between letters unstead of just at the end.

1 Like

Was this issue fixed yet? Any plan to fix it? People enter text by pressing return, not clicking a button each time. It’s very restraining.

Not yet. I recently added another feature request for either a kepress pass through or a separate condition like enter was just pressed.

The more voices, the more likely they’ll do something. Feel free to like and/or comment on mine or any others.

1 Like