я предлагаю вам код, который я использовал в своем коде, но вы можете использовать этот код в соответствии с вашими потребностями -
локальная функция fieldHandler (событие)
если («начала» == события .phase), то
-- This is the "keyboard has appeared" event
-- In some cases you may want to adjust the interface when the keyboard appears.
ElseIf ("закончился" == event.phase) затем
-- This event is called when the user stops editing a field: for example, when they touch a different field
ElseIf ("представлен" == event.phase) затем
-- This event occurs when the user presses the "return" key (if available) on the onscreen keyboard
-- Hide keyboard
native.setKeyboardFocus(nil)
end
конец
TextField = native.newTextField (75, 150, 165, 30, fieldHandler)
textField.font = родной .newFont (native.systemFontBold, 24)
textField.inputType = "Название"
группа: вставки (TextField)
Надеюсь, это поможет вам.