EVENT_KEYREPEAT?

BlitzMax Forums/BlitzMax Programming/EVENT_KEYREPEAT?

ImaginaryHuman(Posted 2007) [#1]
KeyChar: data=103, mods=0, x=0, y=0, extra=""
KeyRepeat: data=71, mods=0, x=0, y=0, extra=""

I get these two events when I pressed a key and held it down. There is no key repeat event in the BlitzMax documentation. Alternatively sometimes I see a KeyDown event, then a KeyRepeat, then a KeyUp.

Is there such a thing as EVENT_KEYREPEAT, and if not what should its value be?

How should I interpret key repeats? Should I take the prior character or key down that was pressed, then when a key repeat comes I should start inventing keypresses (post event?) until I see a key up event? Or does some part of the key repeat code include how many times to repeat?


Perturbatio(Posted 2007) [#2]
it was added in 1.22


ImaginaryHuman(Posted 2007) [#3]
I am using 1.22, but it's not in the docs.


tonyg(Posted 2007) [#4]
Missing events
Maybe somebody should enter a Bug Report to get the docs updated.
Doing a search in these forums with EVENT_KEYREPEAT shows this which has a quick example which might help.


CS_TBL(Posted 2007) [#5]
I requested it back then. Without this special event, standard keyrepeat in Windows only worked with certain keys (az09), but not with special keys (F1..F12, cursors, PageUp/Dn etc.).

Upon pressing and holding a key: (from the head)
KeyChar
KeyRepeat
KeyRepeat
KeyRepeat
..
KeyRepeat
KeyRepeat
KeyUp

For best keyboard interaction, always check both KeyChar and KeyRepeat.