Having Next on a virtual keyboard, instead of Done in a form, unless last field

Godot Version

Godot 4.4.1

Question

I have a Form made of a standard LineEdit (SectionName) and a SpinBox (Value).
How can I get a “Next” button on the virtual keyboard instead of Done when on the first field (LineEdit), then Done on the last field (SpinBox).

I first tried:

section_name.focus_next = NodePath("Inner/Options/Duration/Value")

Didn’t work.

Then, even with keeping “Done” on the keyboard, as a hack, I have tried:

func _on_section_name_text_submitted(new_text: String) -> void:
	print("Submitted")
	section_value.grab_focus()

func _on_section_name_focus_exited() -> void:
	print("Exited")
	section_value.grab_focus()

Which doesn’t work, when using the app on Android, Done closes the virtual keyboard and doesn’t give focus to the SpinBox field.

What am I doing wrong?

Why you can’t use inspector for set fucus_next?

I have tried, but when using it on my exported app, nothing happens, it behaves as a normal “Done”.

You can see Submitted or Exited for check?

When I play it via the Godot app on my phone, I can see the Submitted or Exited print.
Just tried with section_value.get_line_edit().grab_focus() instead, and seems to half work, as it grabs focus on the field, however, it doesn’t keep the keyboard open, or reopen it. Ideas?

Just DisplayServer.virtual_keyboard_show("")

Whatever I try seems to show and hide the keyboard in 2 frames, I’ve read that I need to create a plugin (android and iOS) to have the proper “Next” button, I will look into it

1 Like