Re: keyboard shortcuts



Hi ...

I think is not possible to add keyboard shortcut not related with any
signal ... see:

void        gtk_widget_add_accelerator      (GtkWidget *widget,
                                             const gchar *accel_signal,
                                             GtkAccelGroup *accel_group,
                                             guint accel_key,
                                             GdkModifierType accel_mods,
                                             GtkAccelFlags accel_flags);

The second parameter specify what signal will be emited to call the
correspondent callback associated with the action ...

But you can use accelerators without use button or menuitems , because
the first parameter can be any widget the has a signal associated with
it ...

Best Regards ....

On Sun, 20 Feb 2005 12:35:02 +0100, Gyözö Both <gyboth bygfoot com> wrote:
hi,

i think there was a thread about this before but i didn't see the matter
resolved.

is there a way to add keyboard shortcuts to a gtk app without having
signals involved? i'd like to have a function that's called (with
information on the key that's been pressed) whenever a shortcut has
been used that isn't already used by some button or menu item. is this
possible?

gyözö both

--
When love is gone, there's always justice.
And when justice is gone, there's always force.
And when force is gone, there's always Mom.
Hi, Mom!
                -- Laurie Anderson
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list



-- 
Antonio Gomes
Embedded Linux Developer
Embedded Linux Lab - 10LE
INdT - Instituto Nokia de Tecnlogia
Manaus/Br



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