On Wed, 2002-05-15 at 13:30, Christian Reis wrote:
> On Tue, May 14, 2002 at 07:43:51PM +0100, Graham Ashton wrote:
> > 
> > I notice that to capture a key press you don't specify
> > GDK.KEY_PRESS_MASK, yet you can still connect the window to the
> > key_press_event. Why does this work? 
> 
> The window widget listens to the key press events by default, so it
> isn't necessary.

Well I thought this might be the case, so I modified my call to
set_events() to be add_events() instead, but still had no joy. I shall
see if I can get to the bottom of it, and if I do I'll post my findings.

Thanks for all the info. I've no idea why get_events() returns 0 on a
realized widget.

> > While we're on the subject of key snooping, why doesn't PyGTK have a
> > binding to the GTK+ global key snooper, which would surely be a better
> > way to do all this? Is it just that nobody needed it?
> 
> Global key snooper? What's this?

There's very little documentation on it in the GTK+ reference manual,
but it works. It's called gtk_key_snooper_install():

http://developer.gnome.org/doc/API/gtk/gtk-general.html#GTK-KEY-SNOOPER-INSTALL

-- 
Graham Ashton <[EMAIL PROTECTED]>
_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to