Если активен, то считываешь символы с клавы (GetChar или как то так)
C= GetChar()
if(c <> 0) text = text + C
|
Функции GetChar нет.Есть GetKey,которая возвращает код нажатой клавиши,а поэтому надо код надо перевести в букву или цифру.
Global txt$
While Not KeyDown(1)
SelectKey()
prnt$=prnt$+txt$
Text 0,0,prnt$
txt$=""
Delay 100
Flip
Cls
Wend
End
Function SelectKey()
If KeyDown(2)
txt$="1"
EndIf
If KeyDown(3)
txt$="2"
EndIf
If KeyDown(4)
txt$="3"
EndIf
If KeyDown(5)
txt$="4"
EndIf
If KeyDown(6)
txt$="5"
EndIf
If KeyDown(7)
txt$="6"
EndIf
If KeyDown(8)
txt$="7"
EndIf
If KeyDown(9)
txt$="8"
EndIf
If KeyDown(10)
txt$="9"
EndIf
If KeyDown(11)
txt$="0"
EndIf
If KeyDown(12)
txt$="-"
EndIf
If KeyDown(13)
txt$="="
EndIf
If KeyDown(16)
txt$="q"
EndIf
If KeyDown(17)
txt$="w"
EndIf
If KeyDown(18)
txt$="e"
EndIf
If KeyDown(19)
txt$="r"
EndIf
If KeyDown(20)
txt$="t"
EndIf
If KeyDown(21)
txt$="y"
EndIf
If KeyDown(22)
txt$="u"
EndIf
If KeyDown(23)
txt$="i"
EndIf
If KeyDown(24)
txt$="o"
EndIf
If KeyDown(25)
txt$="p"
EndIf
If KeyDown(26)
txt$="["
EndIf
If KeyDown(27)
txt$="]"
EndIf
If KeyDown(30)
txt$="a"
EndIf
If KeyDown(31)
txt$="s"
EndIf
If KeyDown(32)
txt$="d"
EndIf
If KeyDown(33)
txt$="f"
EndIf
If KeyDown(34)
txt$="g"
EndIf
If KeyDown(35)
txt$="h"
EndIf
If KeyDown(36)
txt$="j"
EndIf
If KeyDown(37)
txt$="k"
EndIf
If KeyDown(38)
txt$="l"
EndIf
If KeyDown(39)
txt$=";"
EndIf
If KeyDown(40)
txt$="'"
EndIf
If KeyDown(44)
txt$="z"
EndIf
If KeyDown(45)
txt$="x"
EndIf
If KeyDown(46)
txt$="c"
EndIf
If KeyDown(47)
txt$="v"
EndIf
If KeyDown(48)
txt$="b"
EndIf
If KeyDown(49)
txt$="n"
EndIf
If KeyDown(50)
txt$="m"
EndIf
If KeyDown(51)
txt$=","
EndIf
If KeyDown(52)
txt$="."
EndIf
If KeyDown(53)
txt$="/"
EndIf
If KeyDown(57)
txt$=" "
EndIf
End Function
функция SelectKey переводит код в текстовое значение