A forced keydown() ?

BlitzMax Forums/BlitzMax Beginners Area/A forced keydown() ?

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.

Not sure how you determined that but how about this...
Graphics 640 , 480
While Not KeyHit(key_escape)
	If MilliSecs() > displayfor Cls
	PollEvent()
	Select EventID()
		Case EVENT_KEYDOWN
			Select EventData()
				Case  KEY_ENTER
					DrawText "Enter key pressed" , 0 , 0
					displayfor=MilliSecs()+1000
			End Select
	End Select
	If KeyHit(KEY_SPACE) 
		sim_keydown:TEvent = CreateEvent(EVENT_KEYDOWN , , KEY_ENTER)
		PostEvent(sim_keydown)
	EndIf
	Flip
Wend