[Gambas-user] Knowing keyboard state without being in a key event

DASNOIS Benjamin lordthrend at ...67...
Thu Jul 8 16:17:30 CEST 2004


Rob wrote:

>On Thursday 08 July 2004 09:23, DASNOIS Benjamin wrote:
>  
>
>>I didn't see anything to do this but I hope there's a way to:
>>I would like to know the state of the keyboard anywhere in the
>>code (read: without being in a keyboard event) I need to know
>>if some keys are pressed when being in a loop. I hope someone
>>can help me.
>>    
>>
>
>See my space game example from a few weeks ago (the animation is 
>too slow but the keyboard stuff works fine.)  Basically you need 
>to declare a class-level variable reflecting key state, and set 
>that in each KeyPress or KeyRelease event handler.
>
>Rob
>
No problem if you tell me where I can find it because I wasn't 
subscribed to this list until yesterday.It's for a game too (I'll 
release the source if people want me to cause I'm affraid of the example 
games given with gambas ; it's not good game programming).




More information about the User mailing list