88

I'm a normal-sighted person and I would like to view pages at 100% all the time. I use keyboard shortcuts that involve Ctrl a lot, so about twenty times a day I accidentally hit Ctrl at the same time that I'm scrolling, which results in the page being reflowed and repainted. This is annoying because it can take up to 30 seconds to fix the issue, depending on how complex the site layout is. On sites with dynamic layout such as Google Docs the problem is more serious; accidentally hitting Ctrl+mouse wheel corrupts the display and forces me to refresh the page entirely, sometimes causing me to loose information in the process.

I would like to either decouple Ctrl+mouse wheel from zoom, or disable zoom functionality altogether. This is possible on Firefox by using about:config; is there a similar way to edit detailed settings in Chrome? Would I have access to the detailed settings if I used Chromium instead of Chrome? I'll probably jump ship back to Firefox if I can't solve this problem.

There is a superuser question that asks basically the same thing I'm asking, but for Firefox and Internet Explorer exclusively. Other people on the Chrome forum have had related issues, but none have the same problem. "I would really like it if I could deactivate the auto zoom in/out." had "something with laptops and Windows 7", not the feature built into Chrome. Other people have had PDF specific issues, which doesn't concern me.

I've also tried searching for extensions that allow you to disable the scroll; I had hoped that "Zoom Lock" would have the ability to lock the zoom at 100% and prevent Ctrl+scroll wheel from distorting the display, but it doesn't work for my use case.

I am using Google Chrome (version 9.0.597.84 (Official Build 72991)) on Ubuntu 10.10.

11
  • Yes, great question. I just about posted this myself. I'm getting tired of the exact same thing. Almost enough to stop using Chrome, which is a real shame. Feb 9, 2011 at 10:35
  • 1
    Hum, I'm having the exact inverse problem: I would like to be able to zoom in or out using the scrollwhell. Did Chrome remove support for that? (I'm using Chrome for Mac)
    – julien_c
    Jan 13, 2012 at 22:35
  • This is so annoying, Google is so not user friendly. Jul 5, 2012 at 19:06
  • @julien_c - what about command scroll, does that work for you?
    – Myer
    Jul 6, 2012 at 20:05
  • 1
    This is a bug in Chrome. Please star it. Oct 24, 2017 at 17:19

12 Answers 12

24

There is a solution using AutoHotKey posted on google groups:

Using Logitech Performance Mouse MX...

Downloaded AutoHotKey software

In the AutoHotkey.ahk file, added these to do nothing for Cntrl+MouseWheelScrolling

^WheelDown::return

^WheelUp::return
10
  • 1
    Thanks, this answer is what finally helped me not jump out of a window ( although my adult body would not have fit since i probably zoomed int so tiny while on my way there by accident ) Jun 5, 2013 at 3:45
  • 1
    I had this problem big time when using a Magic Mouse in Windows 7 through Parallels. This little script fixed it all. Thanks!
    – GJK
    Jun 12, 2013 at 13:28
  • 5
    That's also the best solution I've found. However your example disables this for all application. The following script disables CTRL-Wheel for Chrome only: ; Disable mouse wheel zooming in Chrome #IfWinActive ahk_class Chrome_WidgetWin_1 ^WheelDown::return #IfWinActive ahk_class Chrome_WidgetWin_1 ^WheelUp::return
    – Banzai
    Feb 13, 2014 at 16:46
  • @Yaba it is not work for chrome in windows8 mode
    – IliaEremin
    Mar 9, 2015 at 11:31
  • 6
    A Chrome extension called Per Tab Zoom is the perfect solution for this.
    – GetFree
    Jul 17, 2019 at 20:31
22

Solution

This was driving me insane as well, but I just found a chrome extension that works: No Mouse Wheel Zoom

Use

After installing the plugin you need to:

  • Go to extension settings. Make sure that "allow access to file url's" is checked
  • Refresh Your tabs

Works

From the user reviews, it works on Linux, Mac, and Windows; for both mice and touch pads.

9
12

I don't know of any way to disable scrolling, but you could use Ctrl+0 to return to 100% at any time--no need to refresh the page.

4
  • 4
    The real problem here is on sites where javascript dynamically determines the layout, in which case Ctrl+0 never even totally corrects the problem.
    – Myer
    Feb 10, 2011 at 4:35
  • NoScript can solve that in very short order.
    – CarlF
    Feb 10, 2011 at 18:24
  • 6
    Using NoScript on a site like Google Docs where javascript is required is futile. Most dynamic sites no longer support users that disable javascript as studies have shown that less than 2% of all users disable it: developer.yahoo.com/blogs/ydn/posts/2010/10/… . If dynamic sites going to throw development into an arcane, useless cause they'd actually be better off supporting IE6 than supporting users without javascript: marketshare.hitslink.com/browser-market-share.aspx?qprid=2
    – Myer
    Mar 2, 2011 at 16:29
  • as of today, this is the closest to a solution from all the answers here... c'mon google, help us out here... Jun 3, 2020 at 14:53
6

It doesn't look like its possible within chrome at this point, but you could do it from the mouse side. Depending on the drivers for your mouse, you could set ctrl-scroll as a "shortcut" to actually do nothing - essentially capturing the combination and throwing it away. Some drivers will even let you specify this for only within a certain application, at which point you'd specify chrome.

Would need more info of OS and mouse to tell this for sure.

2
  • I don't understand how this would work. And if it did, how would it interact with keyboard shortcuts involving the Ctrl key? The asker says he uses those extensively (as do I), and often that's what causes the problem in the first place. Giving up the ability to use keyboard shortcuts isn't really a solution. Feb 9, 2011 at 10:37
  • I'll have to look into this - I'm on Ubuntu 10.10; I might be able to use xev or something to remap ctrl-scroll on a system level. In-ter-es-ting ...
    – Myer
    Feb 10, 2011 at 4:34
4

In Firefox the zoom function can be disabled via its corresponding setting in about:config.

For Chrome: I have found a free little application called AlwaysMouseWheel which does the trick. It is made for another purpose (which I find useful too) but does prevent the zooming in Chrome.

For IE: However, that application doesn't disable the zooming. So I am looking around for a solution for that now.

1
  • You have found some application, but it seems that the application is Windows specific. The question is not.
    – jarno
    Jan 3, 2020 at 7:19
3

When pressing a hot key that involves the control button, simply pressing the shift key directly after the initial command causes the control to key to "release" and will then disrupt the auto zoom.

A lil bit of an annoyance to add to the work flow, but it's much better than manually doing it every single time.

3

For a solution on Linux, one can use IronAHK, a partial implementation of AutoHotKey on Linux, although its development has bogged down in recent years.

Another possibility is the XMacro utility for recording and replaying keyboard and mouse events on an X server as a script.

A good writeup can be found on the thread AutoHotkey on Linux? by TJGeezer:

I made the transition from Windows 7 to Mint a year or so ago and had the same problem. Now I find myself using a combination of tools to approximate my rather hefty collection of AHK macros and AHK in a virtualbox Windows VM when I can't get around using MS apps or Windows utilities.

But I can get most of the automation I need by combining bash scripts and aliases (including simple functions in a ~/.bash_aliases file) with different utilities. AutoKey uses a simple "exec" command (copied from its sample scripts) to execute a bash script that tells xdotools or xte to simulate mouse or keyboard movements. AutoKey can filter its macros to work only in specified windows. xdotool you're familiar with. xte is part of the xautomate package and is quick and simple for things like moving windows using a specified mouse button. From the xte -h screen:

drag from 100,100 to 200,200 using mouse1:
xte 'mousemove 100 100' 'mousedown 1' 'mousemove 200 200' 'mouseup 1'

For more complicated stuff like changing window geometries and so forth, in Mint 17 I mostly use the wmctrl utility. In Min 16, a great little utility called devilspie with a gdevilspie GUI would automatically change the position and geometry of any window I specified, on opening. Unfortunately, devilspie doesn't work in Mint 17. I keep hoping it'll get fixed in Mint 17 and wishing I knew how to fix it myself.

Hope some of this might help you make the transition.

Incidentally, the problem with wine and AHK is, wine can't access lower-level functions, so you can't use ahk's keyboard or mouse hooks. But I've got to the point where I don't much miss AHK; I simply do the same things with bash aliases or scripts. It's not very hard to kluge together macros using combinations of :

AutoKey (with filtering for specific apps)
xdotool
xte (from xautomation)
wmctrl (for quite good window position and geometry control)
zenity (to pop up readable message boxes)

Oddly, now that I'm used to the approach it seems no harder to use than AHK was. But then I've just gotten to where playing with Linux is as much fun as DOS was back in the days of the dinosaurs. I'd missed that with later stay-inside-the-lines Windows versions.

1
  • So can something like the Trident D'Gao's answer be implemented with these?
    – jarno
    Jan 31, 2020 at 7:39
3

The "Zoom Block" extension can help: https://chrome.google.com/webstore/detail/zoom-block/jmomepcgehgfoimapeoinphcloinjfpb

It disables page zooming in general, unless/until enabled for specific tabs. I've confirmed it works for blocking zooming from [ctrl]+[mouse-wheel], as well as touchpad pinch-zoom.

3
  • This extension did not work for me on windows, even after refreshing and restarting chrome Jun 3, 2020 at 14:51
  • @JoeyBaruch Odd. I'm on Windows as well, and it works fine. What pages did you try? (it will not work on the Chrome "protected pages" such as settings, extensions list, etc.)
    – Venryx
    Jun 4, 2020 at 3:10
  • This is gold, thanks. Comes with whole source code.
    – sanmai
    Mar 22, 2021 at 5:29
3

Disable Scroll Wheel Zoom is currently working for me on Chrome 84 / Ubuntu 20.04. I had to restart chrome after installation for it to start working.

No MouseWheel Zoom had been broken for the last 8 months or so.

2

I have been having an almost identical problem. I'm viewing chrome from a laptop with a built in mouse and no actual wheel, but I would touch the mouse a certain way and find it inexplicably zooming in and out of a page. I am not at all what one would call computer savvy but after reading the first answer I started poking around in my device settings. I found the driver for the mouse, poked around a bit more and eventually found an option to disable "pinch zoom", which thus far seems to have fixed the problem.

1
  • Do you mean touchpad by buit in mouse? Which operating system you are using? Does your solution also affect to zooming which happens normally by pressing ctrl key down and simultaneously using mouse wheel or dragging two fingers up or down on touchpad?
    – jarno
    Jan 3, 2020 at 7:50
2
+50

A couple of possibilities appear on this question over on SO:

https://stackoverflow.com/questions/5637530/disable-shortcuts-in-google-chrome

The two answers there talk about either running chrome in kiosk mode (with --kiosk) or using a node-webkit hack. They appear to be a bit overkill though as they disable almost ALL shortcuts.

However, stealing shamelessly from user240684, you can use Tampermonkey to create a user script which "executes" on every page. The user script being:

var actionwheel = function(evt){var evt = evt ? evt : window.event;
    if(evt.shiftKey || evt.ctrlKey)
    {
        evt.preventDefault();
        return false;
    }
}

This should capture your scroll events and ignore them if the shift key or control key is depressed.

3
  • I made a script with the contents above but the editor shows red ball and tells "'evt' is already defined.". I do not know how to make this work.
    – jarno
    Jan 3, 2020 at 7:39
  • @jarno change var evt to var evt2. Then change all evt references after the if to evt2 and see if that works.
    – Foosh
    Jan 16, 2020 at 17:28
  • It did not help. I think it is not enough that it executes on every page. Or how can it affect to every mouse event on the page? I do not know this scripting language.
    – jarno
    Jan 17, 2020 at 18:14
1

If you do not need Ctrl clicking, you could solve the problem by disabling mouse completely during such a modifier key is down. My answer should work in Unix-like operating systems that use X. This effect is by no means restricted to Chrome.

You need to modify the script below to match your keyboard and pointer hardware. See the comments (i.e. lines that start by #) for more information. After you have modified the script, just save it in a file, make it executable by chmod +x and run it at startup.

#!/bin/bash

# Use 'xinput list' to get the device names and id's, and use 
# 'xinput list $name' to test if you got the $name right.
# Use 'xinput test $id' to get key codes.

# Modify the pointer device name to match your hardware
pointer_id=$(xinput list --id-only 'pointer:Logitech K400')
# Modify the keyboard name to match your hardware
keyb_id=$(xinput list --id-only 'keyboard:Logitech K400')

[[ $pointer_id && $keyb_id ]] || exit 1

# Make sure to terminate precessess and to enable the pointer device
# on exit.
revert() {
    kill $(jobs -p) 2>/dev/null || :
    xinput enable $pointer_id
}
trap revert EXIT

keys_down=0
paused=0
xinput test $keyb_id | while read -r type action key rest; do
    # suppose $type is 'key'
    case $key in
        # key codes of Left Control and Right Control
        37|105)
            if [[ $action == press ]]
                then ((++keys_down))
                # suppose $action is 'release'
                else ((keys_down>0 ? keys_down-- : 1))
            fi
            if (( keys_down && !paused )); then
                xinput disable $pointer_id
                paused=1
            elif (( !keys_down && paused )); then
                xinput enable $pointer_id
                paused=0
            fi
        ;;
    esac
done

I have a related question for the case where you want to disable only certain buttons of a mouse here

2
  • I have written a script that disables unwanted zooming i.e. zooming that happens when a modifier key is pressed after scrolling has been activated. Maybe I'll publish it somewhere someday.
    – jarno
    Jul 13, 2020 at 15:13
  • Check this repository out.
    – jarno
    Oct 1, 2020 at 21:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .