keyboard string

BlitzMax Forums/BlitzMax Beginners Area/keyboard string

Hi, me again, i would like to know if there is any variable that keeps the letters that i pressed during the game process. If there isnt anything like that, how can i make it?

Thank you

Make an array/type that capures keyhit? Unless it's event driven then make an array that captures eventadata from keydown.

might be easier than that. Blitz does it for you:


Graphics 640,480,0

Local mystring:String
Repeat
	If KeyHit(KEY_ENTER)
		mystring = ""
		c=1
		While c>0 
			

			c= GetChar()
			mystring:+ Chr(c)
		Wend
		
	EndIf
	DrawText mystring,10,10
	Flip
	Cls
Until KeyDown(KEY_ESCAPE)



thank you for the replies!