GNOME Bugzilla – Bug 711792
Ctrl++ doesn't zoom in when using Slovenian keyboard layout
Last modified: 2014-03-10 17:18:44 UTC
I am using Slovenian keyboard layout. Keybinding for zooming out (Ctrl+-) works as expected, but for zooming in (Ctrl++) it doesn't - it does nothing. On Slovenian layout + is placed one key left of the backspace and is available without modifier keys (shift, alt..). In #680830 I saw that Ctrl+= can also be used to zoom in and it works ok. But there are two problems with it: * one has to press 3 keys: Ctrl, Shift and 0, which is less comfortable :) * it is hard to discover - on Slovenian layout + and = are not on the same key Ctrl++ works ok in Evince (tested in 3.11.1 and 3.8.3). This bug has been present for quite some time (from beginning?) and it is still there in Gnome Documents I built today with jhbuild.
In Bug 693830 they posted a link for fixing it, since only one keybinding per action can be used. In Gnome 3.12, it is possible to use the gtk_application_set_accels_for_action() method to assign multiple keybindings to an action. There is a way for you to make "Ctrl +" work locally. I have created a small patch for 3.10. Just comment the lines "{ name: 'zoom-in', accel: '<Primary>equal', window_mode: WindowMode.WindowMode.PREVIEW }," in /usr/share/gnome-documents/js/application.js then you can use the plus (but not the Ctrl Shift 0) I tested it on a german keyboard, it works there.
Created attachment 271328 [details] [review] small patch for gnome 3.10 to make zooming in possible with Ctrl and + on non-US Layouts.
Thanks for the workaround - commenting out those two lines fixes the problem for me!
Daniel, thanks for your analysis. I'd like to implement this using the new API to add multiple accelerators, so let's close this bug as a duplicate of bug 693830. The last comment in there points to the correct API to use in this case. *** This bug has been marked as a duplicate of bug 693830 ***