On Tue, Jun 1, 2010 at 09:23, James Cameron <qu...@laptop.org> wrote: > On Tue, Jun 01, 2010 at 12:47:10AM -0300, Gonzalo Odiard wrote: >> I am trying to use the keys with the circles with diferent sizes to >> change the size of the tool, but didn't see any event. >> Can anybody help me? > > I've tried what you tried, and found that there were no events logged > until focus was switched to the drawing area widget. > > For example, start Paint, focus is on "Stroke Color". Press right-arrow > key and focus moves to Pencil icon. Press Tab once and focus will be on > the toolbar tabs. Again, and focus will move to the Area > (gtk.DrawingArea) widget. > > Only with focus there are events seen by key_press. > > If you need activity global events, consider accelerators.
What about listening for those events on the top level window (Activity class) instead of the canvas? I think the journal is doing that, and I guess other activities as well. Regards, Tomeu > -- > James Cameron > http://quozl.linux.org.au/ > _______________________________________________ > Sugar-devel mailing list > Sugar-devel@lists.sugarlabs.org > http://lists.sugarlabs.org/listinfo/sugar-devel > _______________________________________________ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel