try this way
(me tested it only at pc)
rem
rem AGK Application 2.0.22
rem MR
SetWindowSize(800,600,0)
SetVirtualResolution(100,100)
do
print("Wait Loop, Press A for Input, Esc for End")
print(text$)
if GetRawKeyReleased(65)
print("A")
text$=Input("Markus",32)
endif
if GetRawKeyReleased(27)
exit
endif
Sync()
loop
end
Function Input(textin$,length)
local text$ as string
edit=CreateEditBox()
SetEditBoxMaxChars(edit,length)
SetEditBoxText(edit,textin$)
SetEditBoxPosition(edit,0,-GetVirtualHeight()) //off screen
SetEditBoxBorderSize(edit,0)
SetEditBoxFocus( edit, 1 ) //hit it :)
do
sync()
text$=GetEditBoxText(edit)
print("Input:"+text$)
if GetEditBoxChanged(edit)
exit
endif
if GetEditBoxHasFocus(edit)=0
exit
endif
loop
DeleteEditBox(edit)
sync()
endfunction text$
AGK (Steam) V2.0.21 : Windows 10 Pro 64 Bit : AMD (16.6) Radeon R7 265 : Mac mini OS Sierra (10.12)