Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 388553

Summary: Zooming shortcut doesn't work
Product: [Tools] GEF Reporter: Dennis Melzer <dennis.m>
Component: GEF-Legacy GEF (MVC)Assignee: Alexander Nyßen <nyssen>
Status: RESOLVED FIXED QA Contact:
Severity: minor    
Priority: P3 CC: justin, michael.wenz, nyssen
Version: 3.8   
Target Milestone: 3.9.0 (Kepler) M7   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Dennis Melzer CLA 2012-08-31 11:47:52 EDT
The Shortcut "CTRL + =" (toolbar) doesn't work. The zoom out shortcut works well.

Why is the zoom in shortcut "CTRL + ="? Normally the zooming shortcut is 
"CTRL + +"
Comment 1 Michael Wenz CLA 2012-09-03 07:48:15 EDT
We simply take those key binding over from GEF.
Can you comment on why = is used instead of +? Also it seems that = does not work with a german keyboard, with an english keyboard this shortcut works nicely.
Comment 2 Dennis Melzer CLA 2012-09-03 15:52:30 EDT
All programs i know use the shortcut "CTRL +" e.g. Browser (Chrome,Firefox). Which program that uses the "CTRL = " do you know?

Yes english keyboard "=" works, but german keyboard "=" doesn't
Comment 3 Alexander Nyßen CLA 2012-10-01 18:52:37 EDT
I think it is reasonable to change this to "CTRL/CMD + +"for 3.8.2 and 3.9.
Comment 4 Alexander Nyßen CLA 2012-10-01 18:58:28 EDT
Changed keyboard shortcut to 'CTRL/CMD' + '+'. Pushed changes to master and R3_8_maintenance. Resolving as fixed in 3.8.2.
Comment 5 Justin Dolezy CLA 2013-04-05 04:13:12 EDT
Unfortunately this "fix" has broken zoom in on English keyboards! With GEF 3.8.2 I cannot zoom in via the keyboard shortcut anymore.

I have tried on US/UK keyboards on Windows 7 & Mac OS X Mountain Lion. '+' on these keyboards is actually above '=' but holding down shift doesn't work.

It's possible to work around this by adding the old M1+= binding into my application.

The reporter says that other application detail 'CTRL++' (like Firefox I'm currently using on Windows) however it reacts to CTRL+= just the same as with CTRL+NUMERIC_KEYPAD_PLUS on this desktop keyboard (I don't have a numeric keypad on my laptop where I'm doing the dev work so can't test that, can try later with USB keyboard though)

Is this actually an internationalization issue? Is there even support for specifying different bindings per keyboard type?!
Comment 6 Alexander Nyßen CLA 2013-04-08 09:38:24 EDT
Hmm, that's bad. Zoom shortcuts are actually defined in org.eclipse.gef/plugin.xml via the org.eclipse.ui.bindings extension point (so one should be able to overwrite them indeed). I think we will have to change the default bindings there and introduce proper defaults for different platforms/locales (currently there is just one binding), or remove the default bindings at all (we could leave that to clients, as GEF is only a framework).
Comment 7 Alexander Nyßen CLA 2013-04-17 02:49:27 EDT
I changed the binding within plugin.xml of org.eclipse.gef to the following (i.e. made the M1++ binding bound to locale 'de' only) and pushed the changed to master: 

	<extension point="org.eclipse.ui.bindings">
		<key
			sequence="M1+="
			commandId="org.eclipse.gef.zoom_in"
			schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/>
  		<key
        	commandId="org.eclipse.gef.zoom_in"
        	locale="de"
        	schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
        	sequence="M1++"/>
		<key
			sequence="M1+-"
			commandId="org.eclipse.gef.zoom_out"
			schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/>

Please consume on of our next nightly-builds (> #659) from https://hudson.eclipse.org/hudson/job/gef-master/lastSuccessfulBuild/artifact/update-site/ and confirm that the desired behavior is restored correctly. Please make sure to not run into #390298 (so delete workbench.xmi in your runtime workspace before trying out the new bindings).
Comment 8 Alexander Nyßen CLA 2013-04-17 02:56:34 EDT
I.e. >= 659...
Comment 9 Alexander Nyßen CLA 2013-05-06 08:43:41 EDT
Resolving as fixed in 3.9.0M7. Please re-open in case this still is a problem for you.