Adding a function key to a window
- From: "ddudley" <ddudley mybearcreek com>
- To: <gtk-app-devel-list gnome org>
- Subject: Adding a function key to a window
- Date: Tue, 16 Dec 2003 12:00:25 -0700
I'm trying to simply add button to a window that the user can either click or press F7, either of which will
invoke a callback function.
I use gtk_signal_connect_object() to assign my callback function, which is working fine if I click the
button, but the F7 key doesn't work.
I have an accelerator group, and I first tried adding the GDK_F7 key using:
gtk_widget_add_accelerator( FK7, "clicked", accel_group, GDK_F1, 0, GTK_ACCEL_LOCKED );
but the function was not recognized.
I tried replacing that function with gtk_accel_group_connect, but I'm not sure what's supposed to go in the
'closure' arg.
The gtk reference pages say you don't usually call this directly, but through the ItemFactory.
So how do I just tie an F7 key to a function? Am I trying the wrong method by using accelerator groups?
Thanks
Don
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]