https://developer.gnome.org/gtk3/stable/gtk3-Bindings.html

But that might be too "byzantine" for you.

-A. Walton


On Thu, Apr 3, 2014 at 4:28 PM, Brian Marshall <bma...@gmail.com> wrote:

> Hi,
>
> I have an action (zooming in, for example) that needs multiple
> keyboard accelerators ("plus", "equal", "KP_Add"). I'm using a
> Gio::Action (gtkmm), with the accelerator added separately to the
> Gtk::Application. Intuitively, I'd expect multiple calls to
> Gtk::Application::add_accelerator() to add multiple accelerators for a
> single action, but instead it replaces the last one.
>
> One solution I've seen involves adding multiple GtkActions with
> different accelerators and the same callback. But Gio::Actions don't
> know about accelerators, so in the window code, it'd look like
> multiple identical actions were added, with the different accelerators
> set in another part of the code. That seems to go against the loose
> coupling between actions and accelerators that Gio::Actions provide
> over Gtk::Actions.
>
> Another solution is to handle the key-press-event signal and manually
> check if the key press should trigger an action. This also feels
> hacky, like I'm adding a custom accelerator system on top of GTK's
> existing one.
>
> Is there a clean solution for this problem? Thanks.
> _______________________________________________
> gtk-list mailing list
> gtk-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/gtk-list
>
_______________________________________________
gtk-list mailing list
gtk-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-list

Reply via email to