[Gambas-user] Application_mousedown() + Application_keypress() ?

Benoît Minisini gambas at ...1...
Sat Sep 12 15:42:57 CEST 2009


> I'm trying to get an application-wide mouse down event to register.  I
> found that when I do a Form_mousedown() it only triggers when you click
> on an empty part of the form, not when you're clicking on any type of
> control.  I'm looking for something that will trigger whenever you hit
> the mouse button.  (My app is going to be full screen, so I don't care
> if it works outside of the app window or not.)
> 
> During my searching of the list archives, I found someone tried to use
> Application_Keypress() as a way to get a key press while the app is
> running.  Well, I tried it and it doesn't work, nothing happens:
> 
> Static Public Sub Application_Keypress()
>     Message.Info(Key.code)
> End
> 
> I tried it on Gambas 2.8 and I even compiled Gambas 3.0 r2329 and that
> didn't change anything.  I am using GTK only (Ubuntu).  Any ideas?
> 
> Thanks,
> Lee
> 

There is no global pointer event handler, only Application_KeyPress(). But 
apparently it does not work with gb.gtk... Can you try with gb.qt to see if at 
least Application_KeyPress() is called? Note that this function must be 
defined in the startup class!

-- 
Benoît Minisini




More information about the User mailing list