GNOME Bugzilla – Bug 697687
Accelerator for Control key displayed as Primary
Last modified: 2018-03-26 15:28:51 UTC
I have several standard actions setup in Glade 3.15 with keyboard accelerators. Some of these such as Copy are typically implemented as Control-C on most platforms, but are implemented as Command-C on others. For these, Gtk/Gdk use the term "Primary" to indicate a virtual key binding that changes depending on the platform. Glade doesn't handle these types of bindings correctly. For example, here's how the Glade UI displays a keyboard accelerator for copy: > <Primary>c But what's actually written to the UI file is different: > <accelerator key="c" modifiers="GDK_CONTROL_MASK"/> As far as I can tell there's no way to change this behavior in Glade. This effectively means that Glade files aren't cross-platform, because when I run the app on my Mac they're still mapped to Control. On the other hand, keyboard accelerators that are hard-coded in Vala, C, etc, i.e. "<Primary>x" *do* get remapped to Command-X on Mac OS X. So it's safe to say that this feature works outside of Glade. I've tested this on Ubuntu Quantal and a Mac running Lion with Gtk 3.8.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/glade/issues/125.