Keydown Values

BlitzMax Forums/MaxGUI Module/Keydown Values

duquette(Posted 2008) [#1]
I have upto date blitz max and maxgui.
The key return commands are not working like they should.
Such as keydown(Key_letter)


d-bug(Posted 2008) [#2]
You know that you have to use EVENT_KEYDOWN and/or EVENT_KEYUP in MaxGUI, don't you?

Repeat
   WaitEvent ()

   Select EventID ()
     'blabla events blabla


     Case EVENT_KEYDOWN
       Select EventData ()
         Case KEY_ESCAPE
           'do something
         Case KEY_A
           '...
       End Select


     'blabla more events blabla
   End Select

Forever



SebHoll(Posted 2008) [#3]
Or call the EnablePolledInput() command before your main event loop.


Brucey(Posted 2008) [#4]
I thought KeyDown was Graphics based? I would have to go with d-bug on this one.


duquette(Posted 2008) [#5]
Still not working.Blitz max is not returning values on key code, I think it only works when my opengl canvas is active.


GfK(Posted 2008) [#6]
Post some code.


Mark Tiffany(Posted 2008) [#7]
Still not working.

Did you try the suggestions above?


d-bug(Posted 2008) [#8]
I vote for "NO" :)


duquette(Posted 2008) [#9]
Yes and it fixes the mouse problem only, not key board.


d-bug(Posted 2008) [#10]
Can we have some code?


Yan(Posted 2008) [#11]
I thought KeyDown was Graphics based?
It is, in that Graphics() calls EnablePolledInput().