Event 515

BlitzMax Forums/BlitzMax Programming/Event 515

Trying to port my own getASyncKeyState-based keyroutine from B+ to bmax I stumbled upon some problem.

Without getting into details, there're 3 phases for a keypress.

phase 1: eventid 513 (key pressed down)
phase 2: eventid 515 (key repeat/hold down)
phase 3: eventid 514 (key up/released)

So, 515 occurs when you have keyrepeat, which is required for own text'ish editors, or any other app with keyboard-navigation for that matter.


When scanning these events with a simple app like this:
Strict
Local window:TGadget=CreateWindow("o_O",0,0,640,480)
Local ohboy_this_canvas_so_rocks:tgadget=CreateCanvas(0,0,640,480,window)
ActivateGadget ohboy_this_canvas_so_rocks
OnEnd quit
Repeat
	WaitEvent()
	
	If EventID()=513 DebugLog "----"
	DebugLog "data: " + EventData() + " id: "+EventID()
	
	If EventID()=EVENT_WINDOWCLOSE End	
Forever

Function quit()
	GCCollect()
	End
End Function


It's clear that stuff like cursorkeys, page up/dn and a lot of other keys don't create that keyrepeat id (515). Which sucks, esp. since it did work in Blitzplus!

Because I don't get an event back, my routine isn't called, and simply said: I can't do much with all this..

(my routine itself isn't important here, it just stores the states for all the keys)

So simply said: I need an event (keyrepeat/515) for the keys that currently don't do that, but did so in B+

'Can we fix it' ? :P

(oh btw: you NEED a canvas .. is that normal??)