MaxGUI catching keypresses?

BlitzMax Forums/BlitzMax Programming/MaxGUI catching keypresses?

ozak(Posted 2006) [#1]
Hi. I want to capture special keys such as escape and return in my MaxGUI app but I don't seem to get any key events? Do I need to do anything special?


Dreamora(Posted 2006) [#2]
ctrl, shift and alt are modifiers not key, for those you need to check for the modifier events
return should have its own handling as it is used on a "higher level" (usage of default button, new line in textarea etc) and not be usable


ozak(Posted 2006) [#3]
Ok. But what about escape then? I don't get any key events. Do I need to hookup to something?


Dreamora(Posted 2006) [#4]
Can't say.
Switched to modifier key combos when using Max (like ctrl - Q for quit and similar, as you can simply hook those up and it handels itself)


CS_TBL(Posted 2006) [#5]
ozak: panels and canvases can get keyevevents, tho not quite 100% the way I like and surely not complete.

Create a window and a canvas, click on it and have some eventmonitor output to the debugwindow to see EventID()'s and EventData()'s. (Or look in the manual :P)


skidracer(Posted 2006) [#6]
Look up SetHotKeyEvent.


ozak(Posted 2006) [#7]
Ahh thanks. SetHotKeyEvetn did the trick :)