[Gambas-user] Control + key combination detection Q

Benoît Minisini gambas at ...1...
Fri Oct 8 20:33:30 CEST 2010


> > > It works as expected with gb.qt4.
> > > 
> > > That Key.Code is the code of the CTRL key. You receive it when the CTRL
> > > key
> > > 
> > >  is pressed, not when the R key is pressed.
> > > 
> > > Note that gb.gtk makes a difference between the Key.Code of 'R' and
> > > 'r', whereas it should not. I will try to fix that.
> > > 
> > > Regards,
> > 
> > Sorry to be dumb, then how can I dectect Crl R?
> 
> I think I understand the problem: apparently keypress events are lost when
> they are used by a menu shortcut. I don't see them anymore, even in the
> event loop.
> 
> No idea why, it didn't work like that before, so I think Qt4 has changed
> something recently about that.
> 
> I will investigate...

OK. After having read the Qt source code, I can confirm that now, when a 
shortcut is defined, it is impossible for the gb.qt4 component to see the 
corresponding keypress event.

I understand the logical behind that, but unfortunately that means I don't 
have the same behaviour now between gb.qt4 and gb.gtk. And I don't know if I 
can make gb.gtk behave like that!

As for you, just don't want to catch CTRL+R whereas you have a menu shortcut 
using that key.

Regards,

-- 
Benoît Minisini




More information about the User mailing list