On Tue, 2005-05-10 at 09:53 +0100, y g wrote:
> hi there, i am trying to use an accelerator of a togglebutton so that
> when the key is pressed the togglebutton is activated otherwise it is
> deactivated. In other words as long as you press a key a togglebutton
> is release and when the shortcut button is released so is the
> togglebutton. I am failing to do that with an accelerrator using the
> clicked and activate signals. Note I am building the interface using
> glade.

I'm a GTK+ beginner, but I may be able to point you in the right
direction. My understanding is that accelerators are supposed to be
one-shot events. A user presses a button combination and it's just as if
the user had clicked on a menu item.

What you want is to be informed when a particular key is pressed and
when it is released. After some googling, I found this:

http://mail.gnome.org/archives/gtk-list/1999-June/msg00220.html

The good news is that the original poster wanted to do something like
what you want to do and included some code demonstrating how to do it.
The bad news is that his code mysteriously failed. Maybe something like
that will work for you?


hth,

Eric

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to