How to disable zoom on Ctrl+scroll in Visual Studio 2010?
Asked Answered
L

5

169

Visual Studio 2010 adds a zoom setting on the bottom left of the text editor (to the left of the horizontal scroll bar) and also adopts the Ctrl+mouse scroll idiom for zooming in and out.

The former is fine, but I dislike the latter as I am occasionally still holding control when I start scrolling my source code (which results in the text size radically changing and completely throwing me off whatever I was doing).

How do I disable it?

Longwood answered 18/5, 2010 at 22:39 Comment(8)
+1. This control + mouse scroll feature is horrible. What were they thinking?Deedeeann
@Deedeeann I doubt they do think at all when making GUI for their softwareAlmita
@GeorgiiOleinikov, that's very deep.Houdini
If this isn't the stupidest feature in Visual Studio I don't know what is.Guibert
It's a "great new feature", apparently. :)Galacto
@RosdiKasim That's an incredibly bold statement considering many people love the zoom feature - myself included. If you can't come up with a reason to use it, that's fine, but I use it every single day many, many times and I know I'm gaining efficiency as a result. I use this feature in many other programs as well with quantifiable benefits and zero downsides. As Mark said, but non-sarcastically, it is a great feature even though it isn't actually new.Forget
It's good to see i'm not the only one who hates this featureMook
the control+mouse scroll is used everywhere, not only MSVC and it's great. a lot of my colleagues also use thatMcminn
E
230

Go to Tools->Extension manager, and search the online gallery for "wheel". Download "Disable Mouse Wheel Zoom"

enter image description here

Or use this direct link: Disable Mouse Wheel Zoom.

Emmett answered 18/5, 2010 at 22:46 Comment(11)
Selected this as the answer because it was the method I ended up using to install the extension.Longwood
If it ever isn't the first link, the name is "Disable Mouse Wheel Zoom", and here is a direct link.Melessa
Wonderfully useful extension. I kept accidentally zooming in to my source code and it was getting very annoying!Kg
Bless this extension! I thought I was going to have to ditch my Kensington trackball with the integrated scroll wheel from all the accidental zooming...Greensward
This extension has not yet been updated for Visual Studio 2012 RC, but there are instructions in the Q&A section of its page in the gallery that explain how to enable installation in VS 2012 RC and it seems to function correctly once installed.Longwood
Confirmed available and working in VS 2013 as well. Yay!Ping
Most popular Visual Studio extension ever. I echo the sentiment of "what were they thinking"?! This isn't a video game, it's an IDE for productive software development and Ctrl + V + subsequent scroll while still holding down Ctrl has VERY relevant use (i.e. pasting code several places in the same document). Hats off to the developer of this extension. Microsoft needs to relegate zooming to a submenu where it belongs, not primary keystrokes used by every efficient developer on the planet.Bandog
This extension should come installed by default in future versions of VS !Silverweed
This zoom thing is very annoying with laptops.Azarria
Upvoted because this works and is simple. I also tried the AutoHotKeys suggested by Herb Caudill which I like even more.Pawsner
It seems this extension is no longer available for recent Visual Studio versions.Epicene
O
46

It is possible that Visual Studio 2010 will get into a state where ordinary use of the mouse wheel (ie without Ctrl pressed) results in text increasing or decreasing in size.

Use ctrl + scroll on the page to recover from this state.

Overplus answered 25/1, 2012 at 21:15 Comment(6)
This answer is quite handy if you ever get stuck in this state (which has happened to me a couple of times - could this be a bug in VS2010?). Hence upvote.Cockaleekie
Doesn't answer the OP question, certainly. But this page came up first on my google search, and this answered my question.Myrtlemyrvyn
I reposted this as a separate question and answer in hopes of making it easier to find for people looking for the answer to that question (as opposed to the one I was looking for in this question): #11621790Longwood
+1 for great tip. And how to I reset to the default zoom level? (me stuck with larger than normal font)Deedeeann
This is what I was looking for but not the answer to the question. Upvote though becuase it answered my question.Higgle
For me this only worked with right control button. Left control didn't reset the behavior.Dusk
H
10

I don't believe there is a way to do this the editor through the exposed options. However Noah Richards, a visual studio platform developer, wrote a Visual Studio extension that disables the mouse scroll zooming.

Holsinger answered 18/5, 2010 at 22:46 Comment(0)
A
9

This is a problem throughout Windows, not just in Visual Studio. To disable Ctrl-Scroll zooming behavior throughout Windows, you can use AutoHotKey as described in this answer:

^WheelDown::return
^WheelUp::return

This just reprograms AutoHotKey to do nothing on Ctrl-Scroll.

Angevin answered 20/4, 2013 at 15:26 Comment(3)
I also added #MaxHotkeysPerInterval 16384Pawsner
@Forget problem: "a matter or situation regarded as unwelcome or harmful and needing to be dealt with and overcome." Seems to me the definition of a problem fits. You love this "feature", fine. Others don't. Here it is 2019 and I don't know how to turn this annoying "feature" off in VS. So it is still a problem for me. At last all of the hours I have invested/wasted in AutoHotkey are useful. 2 minute fix. - Thanks for that.Swaine
@AndrewDennison Cool, you used a dictionary definition to completely ignore the intended usage of the word. Great argument and point. Really, bravo to you for finding the world's most specious argument.Forget
C
0

This is a Windows limitation, that even on Visual Studio 2022 can't be "solved". But the limitation can be circumvented using AHK. Just write this script, compile it, run it and voila:

#IfWinActive ahk_exe devenv.exe
^WheelDown::return
^WheelUp::return
#IfWinActive
Charterhouse answered 19/3, 2023 at 21:39 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.