[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gtk-app-devel
Subject:    Re: Can A Drawable Canvas Receive Key Events?
From:       Tristan Van Berkom <tvb () gnome ! org>
Date:       2007-03-30 20:34:52
Message-ID: 1175286893.4608.47.camel () scrabble-desktop
[Download RAW message or body]

On Fri, 2007-03-30 at 13:02 -0700, Mike Melanson wrote:
> Hi,
> 
> I have a standalone test app that has nothing inside the main window but 
> a big, drawable RGB canvas (GtkDrawingArea). I can receive nearly any 
> kind of event via the canvas: Expose, mouse motion, button 
> press/release, scroll wheel, etc. However, I *cannot* figure out how to 
> get key press events. I even added the key up/down events to the 
> widget's event list using the GDK_KEY_PRESS_MASK and 
> GDK_KEY_RELEASE_MASK flags passed to gtk_widget_add_events().
> 

Did you add the events to the event mask before the widget was
realized ?

Does the widget in question have keyboard focus at the time
you want to recieve the keyboard events ?

Is the widget in question marked to be focus-capable ?
(i.e. the can-focus bit/property)

Cheers,
                 -Tristan


_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic