[Gambas-user] Keyboard input help requested

Benoît Minisini gambas at ...1...
Thu Mar 22 11:36:34 CET 2012


Le 22/03/2012 10:30, Cogier a écrit :
>
> Benoît,
>
> I am using Gambas 2.21 and tried the code below but I still get nothing when
> pressing the keyboard, in fact the SUB does not seem to be called at all.
>
> What am I missing?
>
> Thanks,
>
> Charlie Ogier
>
> ' Gambas class file
>
> PUBLIC SUB Form_Open()
> FMain.Show
> END
>
> PUBLIC SUB Application_KeyPress()
>
>     PRINT "Key";; Key.Code;; "'"; Key.Text; "' has been pressed."
>     PRINT "Was here"
>
> END
>

The Application_KeyPress() function must be static.

Regards,

-- 
Benoît Minisini




More information about the User mailing list