Files: gtk-azzit-001104-0.patch.gz gtk-azzit-001104-0.patch.README This patch introduces the functions gdk_key_grab and gtk_key_grab. void gdk_key_grab(guint keysym, GdkModifierType modifier); // interally used void gtk_key_grab(GtkWidgt *widget, guint keysym, GdkModifierType modifier); These two enable GTK+ Applications to make use of passive grabs which are triggered, when the specified key/modifier combination is pressed. This patch applies to GTK+-1.2.8 Lukas Schroeder The following are only the relevant parts, and are not a compilable example: void keypresses(GtkWidget *w, GdkEventKey *e, gpointer userdata) { /* check for the XGrabKey combination */ if (e->type == GDK_KEY_PRESS && e->state == GDK_SHIFT_MASK && e->keyval == GDK_Shift_R) { /* do whatever is toggled by the grab */ /* ... */ } /* ... */ } int main(int, char **) { /* ... */ toplevel = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_signal_connect (GTK_OBJECT(toplevel), "key-press-event", keypresses, NULL); gtk_grab_key(toplevel, GDK_Shift_R, GDK_SHIFT_MASK); /* ... */ }