# Each character that is typed by the user is
# displayed on the screen. The line of displayed
# text grows, character-by-character, until the
# user ends the line with a carriage return or
# deletes the line.
string variable CompleteLine_SV
textual region TextEcho_TR size 800 30
at position 0 200
# If the user deletes the current line of text by
# simultaneously pressing the CONTROL and the U
# keys, the line disappears from the display
# screen:
response to char "\^U" from keyboard
copy "" to CompleteLine_SV
clear TextEcho_TR
# When the user completes a line by pressing the
# return key, the specified actions are taken and
# the displayed line disappears from the screen:
response to char "\n" from keyboard
copy textual line 1 from TextEcho_TR to CompleteLine_SV
clear TextEcho_TR
response to char from keyboard
add to TextEcho_TR
insert input