MCPcopy Create free account
hub / github.com/defold/defold / LuaShowKeyboard

Function LuaShowKeyboard

engine/gui/src/gui_script.cpp:4110–4118  ·  view source on GitHub ↗

shows the on-display keyboard if available [icon:ios] [icon:android] * Shows the on-display touch keyboard. * The specified type of keyboard is displayed if it is available on * the device. * * This function is only available on iOS and Android. [icon:ios] [icon:android]. * * @name gui.show_keyboard * @param type [type:constant] keyboard type * * -

Source from the content-addressed store, hash-verified

4108 * @param autoclose [type:boolean] if the keyboard should automatically close when clicking outside
4109 */
4110 static int LuaShowKeyboard(lua_State* L)
4111 {
4112 Scene* scene = GuiScriptInstance_Check(L);
4113 int type = luaL_checkinteger(L, 1);
4114 luaL_checktype(L, 2, LUA_TBOOLEAN);
4115 bool autoclose = (bool) lua_toboolean(L, 2);
4116 dmHID::ShowKeyboard(scene->m_Context->m_HidContext, (dmHID::KeyboardType) type, autoclose);
4117 return 0;
4118 }
4119
4120 /*# hides on-display keyboard if available
4121 * Hides the on-display touch keyboard on the device.

Callers

nothing calls this directly

Calls 5

GuiScriptInstance_CheckFunction · 0.85
luaL_checkintegerFunction · 0.85
luaL_checktypeFunction · 0.85
lua_tobooleanFunction · 0.85
ShowKeyboardFunction · 0.85

Tested by

no test coverage detected