Hi,
> Maybe this post will help you a bit:
> http://www.mail-archive.com/[email protected]/msg19101.html
Yes thank you, it did. It talks of using keybinder. Unfortunately
that requires binding a particular key combo to a handler (not just
any key, or mouse). However I downloaded keybinder and found in the
source that they were just using add_filter on the gtk.gdk.Window.
So that I am using a filter now to accept all events (supposedly).
This is my code:
def wakeup(event):
if not need_to_do_something:
return gtk.gdk.FILTER_CONTINUE
# do stuff
return gtk.gdk.FILTER_CONTINUE
rootwin = gtk.gdk.get_default_root_window()
rootwin.set_events(gtk.gdk.ALL_EVENTS_MASK)
rootwin.add_filter(wakeup)
The only problem with this is that event.type is always
<enum GDK_NOTHING of type GdkEventType>
and I don't receive all events, keyboard ones don't get through, which
is odd. However, it does work well enough for me at the moment.
Thanks for your help
Matt
_______________________________________________
pygtk mailing list [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/