Well i guess the simplest way to get basic input would be something like this, you need to create a value to store the data in there.
function keyboardHandler(eventType, character, keycode, modifiers)
if eventType==eEvtKeyTextInput then
Values["name"].String = Values["name"].String .. character
elseif eventType == eEvtKeyDown and keycode == 8 then
Values["name"].String = string.sub(Values["name"].String, 1, -2)
end
startAction("Scenes[scene].SceneActions[refresh]")
return false
end
registerEventHandler("keyEvent", "keyboardHandler")
When refresh action only display the object text which includes
This script works great. I experienced a funny behaviour when the string contains umlauts like ä ö ü and stuff.
When pressing backspace and this should erase only the umlaut, the complete string gets removed...
Example:
Type "lkada sdaü asdkjh".
Press Backspace.
Continue pressing backspace.
When reaching the ü all characters before also get removed.
funny