See if this helps at all.
// Basic setup
autoCam off
backdrop on
color backdrop 0xffffff
// Lock the frame rate
sync on
sync rate 60
sync
// Create a random 3d scene
for o = 1 to 30
make object cube o, 1
position object o, 10 - rnd(20), 7 - rnd(14), 10 + rnd(6)
rotate object o, rnd(360), rnd(360), rnd(360)
color object o, 0xffaa00
next o
// Setup the text color
ink 0xff212121, 0xff000000
// Declare a variable to handle a flashing cursor
global cursorFlash as integer : cursorFlash = -1
// Start the main loop
global breakLoop as boolean : breakLoop = 0
while (breakLoop = 0)
// Exit if escape is pressed
if (escapeKey() = 1)
breakLoop = 1
endIf
//Render the current text entry
inc cursorFlash
if (cursorFlash < 10)
text (screen width() - text width(entry$(1) + "|")) / 2, screen height() / 2 - text height("M"), entry$(1)
else
text (screen width() - text width(entry$(1) + "|")) / 2, screen height() / 2 - text height("M"), entry$(1) + "|"
if (cursorFlash = 20)
cursorFlash = 0
endIf
endIf
// Try to grab the input once enter is pressed
if (returnKey() = 1)
// Grab the input
local textEntry as string : textEntry = entry$(1)
// Strip the return from the end
textEntry = left$(textEntry, len(textEntry) - 1)
// Do something with the entered text
// ...
// Reset the entry buffer for taking more input
clear entry buffer
endIf
// Animate the cubes
for o = 1 to 30
rotate object o, object angle x(o) + 1, object angle y(o) + 1, object angle z(o) + 1
next o
// Update the screen
sync
endWhile
// Exit the application
end
The 'input' command is almost always unusable really. The 'entry$()' command handles this much better. If you have any questions or problems with the example then please let me know.

Previously TEH_CODERER.