How to handle a keypress

BlitzPlus Forums/BlitzPlus Programming/How to handle a keypress

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.

I figured out how to make it work. I needed to use a HotkeyEvent and reactivate my main window at the end of the message handler

HotKeyEvent(1, 0, $102, 0, 0, 0, 0, WinMain)

;message handler
Repeat
	EvntID = WaitEvent()
	Select EvntID
		Case $102
			If EventData() = 1
				result = Confirm("Terminate Game?")
				If result = True Then End
			EndIf
	End Select
	ActivateGadget WinMain
Forever