I am developping a C application with glade for my embeded device. The ui consists of 3 gtkboxes in a gtkstack.
At each gtkbox there are a few buttons and gtkentries.
The problem is the device hasnot a tab key , nor a mouse. I am going to use a “+” key in replace of the tab key.
Should I attach the EventControllerKey to the gtk_application_window or the three gtkboxes ?
Which properties are needed for the widget(s) ? Is the following code snippet correct ?
GtkEventController * controller = gtk_event_controller_key_new();
gtk_widget_add_controller ( gtk_application_window , controller );
g_signal_connect(
G_OBJECT(controller),
“key-pressed”,
G_CALLBACK( key_pressed_cb ),
gtk_application_window
);
g_signal_connect(
G_OBJECT(controller),
“key-released”,
G_CALLBACK( key_released_cb ),
gtk_application_window
);