gtk_application_set_accels_for_action ignores "<Primary>" within accels
Steps to reproduce
- Use
gtk_application_set_accels_for_action
to set the shortcuts for an action, e.g. Ctrl+q - Note that the accel is used without the
<Primary>
modifier if used, e.g. 'q' instead of 'Ctrl+q'
Example code:
static void
app_startup (GApplication *app) {
AppPrivate *priv;
GtkStyleProvider *provider;
mainApplication = APP (app);
priv = mainApplication->priv;
g_action_map_add_action_entries (G_ACTION_MAP (app),
app_entries,
G_N_ELEMENTS (app_entries),
app);
const gchar *quit_accels[2] = { "<Primary>q", NULL };
gtk_application_set_accels_for_action (GTK_APPLICATION (app), "app.quit", quit_accels);
G_APPLICATION_CLASS (app_parent_class)->startup (app);
}
Current behavior
The action is run only if the <Primary>
key is unused, not with it
Expected outcome
The action is run only when the <Primary>
key is held in addition to the other keys
Version information
Version: 3.24 (from master org.gnome.Sdk)
OS: org.gnome.Sdk//master
Edited by Christopher Davis