Bug 814303 Make command+mouse wheel perform zoom-in/out on Mac r=smaug+smichaud
authorMasayuki Nakano <masayuki@d-toybox.com>
Wed, 28 Nov 2012 10:49:00 +0900
changeset 114315 a2744f8a62f4a1014ae27d5c1c3db61786c50ae2
parent 114314 448ae175d6b9035b13b6a0eb375c21be5b153b76
child 114316 b2352627fb634e81e4a2f594c03128854d98f50d
push id23913
push useremorley@mozilla.com
push dateWed, 28 Nov 2012 17:11:31 +0000
treeherdermozilla-central@17c267a881cf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs814303
milestone20.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 814303 Make command+mouse wheel perform zoom-in/out on Mac r=smaug+smichaud
browser/app/profile/firefox.js
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -526,22 +526,27 @@ pref("browser.gesture.tap", "cmd_fullZoo
 // 2: Go back or go forward, in your history
 // 3: Zoom in or out.
 #ifdef XP_MACOSX
 // On OS X, if the wheel has one axis only, shift+wheel comes through as a
 // horizontal scroll event. Thus, we can't assign anything other than normal
 // scrolling to shift+wheel.
 pref("mousewheel.with_alt.action", 2);
 pref("mousewheel.with_shift.action", 1);
+// On MacOS X, control+wheel is typically handled by system and we don't
+// receive the event.  So, command key which is the main modifier key for
+// acceleration is the best modifier for zoom-in/out.  However, we should keep
+// the control key setting for backward compatibility.
+pref("mousewheel.with_meta.action", 3); // command key on Mac
 #else
 pref("mousewheel.with_alt.action", 1);
 pref("mousewheel.with_shift.action", 2);
+pref("mousewheel.with_meta.action", 1); // win key on Win, Super/Hyper on Linux
 #endif
 pref("mousewheel.with_control.action",3);
-pref("mousewheel.with_meta.action", 1);  // command key on Mac
 pref("mousewheel.with_win.action", 1);
 
 pref("browser.xul.error_pages.enabled", true);
 pref("browser.xul.error_pages.expert_bad_cert", false);
 
 // Work Offline is best manually managed by the user.
 pref("network.manage-offline-status", false);