Added textinput

Use the textinput callback to enter text instead of the keypressed one. Since textinput is better suited for this kind of jobs