EVENT_KEYREPEAT?
BlitzMax Forums/BlitzMax Programming/EVENT_KEYREPEAT?
| ||
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? |
| ||
it was added in 1.22 |
| ||
I am using 1.22, but it's not in the docs. |
| ||
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. |
| ||
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. |