checking ENTER

BlitzPlus Forums/BlitzPlus Programming/checking ENTER

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Hi, Is there a way to check if the user presses enter IF they are inside of a textfield area? I used a check for eventdata but it only works IF the user presses enter before clicking inside a text field. I am making a quiz type game where the user can click inside of a box and type the answer. I have a submit button, but I think its natural to hit enter after the answer is inputed.

Anyway here is my code for checking for enter, but as I say it only works if they havent clicked inside the text field.
Cls
	id = WaitEvent (1)
	Select id
	
	    Case $101 ;keyDown
	       If EventData() = 28 Then  checkAnswer()
			DebugLog EventData()		
			

there is more code of course, but only this is relevant.