Does accels work for window widget only?

Should I connect some action group (with insert_action_group) to the window widget only, to make accels working?

Actions work when I connect group to the Box widget for example, but accels not respond in this case, even this Box is children for the parent Window.

Hi,

For accels, I usually setup them through the GtkApplication:

# Python code
application.set_accels_for_action("group.action", list_of_shortcuts)
1 Like

I do same, but interesting why accels not work when I connect their group to the children widget of this window (of this app also)

Actions work, but not accels.

Do you use the same group name for the widget and the window?

If yes, there may be some preemption of the accel by the widget…
I’m not sure how exactly that works though, I personally always use different group names…

1 Like

All actions and group names in my app are generated with uuid_string_random because I’m working with objects only and won’t to care about namespace conflicts

Accels work only when I attach its group to the ApplicationWindow (e.g. impl GtkWindow). Maybe that’s no problem, but interesting, even I have lot of other questions intuitively not understandable for me as for beginner in GTK ecosystem

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.