No virtual keyboard in Dear ImGUI

Hello, I’m very new to using defold, I’m planning to make a simple multiplayer game for mobile devices. I decided to start learning by doing a chat. I want to use DEAR ImGUI, unfortunately the virtual keyboard does not open, on the forum I only found suggestions for the standard gui built into defold.
Is there a way to fix this?

Sorry, poor English, translated by google
Regards, Maciek.

For text input, you can use other libraries like Druid (defold.com) or Gooey (defold.com)
they manage it quite well

Put this in a gui script, it should work. I tested it on an iPhone.

local keyboard_open = false

function update(self, dt)
	if imgui.want_text_input() and not keyboard_open then
		gui.show_keyboard(gui.KEYBOARD_TYPE_DEFAULT, false)
		keyboard_open = true
	elseif not imgui.want_text_input() and keyboard_open then
		gui.hide_keyboard()
		keyboard_open = false
	end
end
2 Likes

Thank you, the keyboard has been enabled but it doesn’t work quite well, I need to work on it.