keyboard string

BlitzMax Forums/BlitzMax Beginners Area/keyboard string

Josepho(Posted 2006) [#1]
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


tonyg(Posted 2006) [#2]
Make an array/type that capures keyhit? Unless it's event driven then make an array that captures eventadata from keydown.


bradford6(Posted 2006) [#3]
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)




Josepho(Posted 2006) [#4]
thank you for the replies!