90

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.

codekiln
  • 2,012

12 Answers12

26

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
Kevin Panko
  • 7,466
23

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.

13

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.

Kevin Panko
  • 7,466
CarlF
  • 8,872
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.

xdumaine
  • 2,339
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.

Ramin
  • 49
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.

Venryx
  • 394
  • 3
  • 10
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.

Neal Fultz
  • 160
  • 5
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.

Kevin Panko
  • 7,466
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.

Jasmine
  • 21
2

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.

harrymc
  • 498,455
1

If you do not need Ctrl clicking or Ctrl zooming by mouse, you could solve the problem by disabling your mouse device completely when 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

jarno
  • 400
1

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.

Foosh
  • 1,134