diff --git a/gtk/gtkeventcontrollerkey.c b/gtk/gtkeventcontrollerkey.c index 1b67966ec9..d1c4f52bc9 100644 --- a/gtk/gtkeventcontrollerkey.c +++ b/gtk/gtkeventcontrollerkey.c @@ -235,3 +235,16 @@ gtk_event_controller_key_forward (GtkEventControllerKey *controller, return FALSE; } + +guint +gtk_event_controller_key_get_group (GtkEventControllerKey *controller) +{ + guint group; + + g_return_val_if_fail (GTK_IS_EVENT_CONTROLLER_KEY (controller), FALSE); + g_return_val_if_fail (controller->current_event != NULL, FALSE); + + gdk_event_get_key_group (controller->current_event, &group); + + return group; +} diff --git a/gtk/gtkeventcontrollerkey.h b/gtk/gtkeventcontrollerkey.h index 8bb95fc2f1..414f1fef02 100644 --- a/gtk/gtkeventcontrollerkey.h +++ b/gtk/gtkeventcontrollerkey.h @@ -55,6 +55,8 @@ GtkIMContext * gtk_event_controller_key_get_im_context (GtkEventControllerK GDK_AVAILABLE_IN_ALL gboolean gtk_event_controller_key_forward (GtkEventControllerKey *controller, GtkWidget *widget); +GDK_AVAILABLE_IN_ALL +guint gtk_event_controller_key_get_group (GtkEventControllerKey *controller); G_END_DECLS