GNOME Bugzilla – Bug 345339
keybinding for zoom is wrong
Last modified: 2006-10-19 17:47:05 UTC
The menu entry for the zoom keybingings claim that to zoom in is "ctrl+ +" and zoom out is "ctrl + -". In actuality, the ctrl+ {+,-} don't work when using the numpad, but without ctrl works. Using the "normal" + and - keys work with ctrl, but don't seem to require it. Using Ubuntu Dapper
Hmm, relevant code snippet (duplicated several places): /* Zoom in. */ case GDK_plus: case GDK_equal: case GDK_KP_Add: image_viewer_zoom_in (viewer); break; /* Zoom out. */ case GDK_minus: case GDK_KP_Subtract: image_viewer_zoom_out (viewer); break; It looks like the Ctrl key status is simply ignored. The +/= key (GDK_plus, GDK_equal) works whether Ctrl is pressed or not. It looks like the numeric keypad "+" (GDK_KP_Add) should work the same way. But it doesn't... Maybe this is a GDK bug?
Created attachment 72909 [details] [review] Fix to allow detection of Ctrl +/- Not a GDK bug. In src/gth-browser.c (key_press_cb), this piece of code makes the function if ((event->state & GDK_CONTROL_MASK) || (event->state & GDK_MOD1_MASK)) return FALSE; return if the control modifier is set, before interpreting the key pressed. ctrl++ and ctrl+- work, because they are connect to the toolbar zoom buttons in src/gth-window-actions-entries.h. Patch attached.
Fixed in CVS. - Mike