RE: key_release_event

> From: Jan Jirmasek []
> Hi!
>   I have this problem: I have one main window and one drawing area
> inside. I want to catch the key_press_event and the 
> key_release_event and
> according to holding or not holding a key I want to change the current
> cursor inside the drawing area.
>   I wouldn't mind, if I could have chance to catch the 
> signals only in the
> main window handlers. It would be ok, but WHY the key_press_event
> handler of the main window IS called and the 
> key_release_event handler is
> NEVER called?
>   Can anyone help me?

Have you set an event mask for the widget (GDK_*_MASK)? If the GDK_KEY_RELEASE_MASK is not set, you'll never recieve those events.

Hope this helps...



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]