如何在 Visual Studio 2010 中禁用 Ctrl 滚动缩放?
Visual Studio 2010 在文本编辑器的左下角(水平滚动条的左侧)添加了缩放设置,并采用 Ctrl+鼠标滚动惯用法进行放大和缩小。
前者很好,但我不喜欢后者,因为当我开始滚动源代码时,我偶尔仍然掌握着控制权(这会导致文本大小发生根本变化,并完全让我失去我正在做的事情)。
我该如何禁用它?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
转到“工具”->“扩展管理器”,然后在在线图库中搜索“wheel”。下载“禁用鼠标滚轮缩放”
或使用此直接链接:
禁用鼠标滚轮缩放。
Go to Tools->Extension manager, and search the online gallery for "wheel". Download "Disable Mouse Wheel Zoom"
Or use this direct link:
Disable Mouse Wheel Zoom.
Visual Studio 2010 可能会进入这样的状态:普通使用鼠标滚轮(即未按下 Ctrl)会导致文本大小增大或减小。
使用 ctrl + 滚动页面可从此状态恢复。
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.
我不相信编辑器有办法通过公开的选项来做到这一点。然而,Visual Studio 平台开发人员 Noah Richards 编写了一个 Visual Studio 扩展,可以禁用鼠标滚动缩放。
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.
这是整个 Windows 中的问题,而不仅仅是 Visual Studio 中的问题。要在整个 Windows 中禁用 Ctrl-Scroll 缩放行为,您可以使用 AutoHotKey,如此答案中所述:
这只是重新编程 AutoHotKey 来执行以下操作: Ctrl-Scroll 上什么也没有。
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:
This just reprograms AutoHotKey to do nothing on Ctrl-Scroll.
这是 Windows 的限制,即使在 Visual Studio 2022 上也无法“解决”。但可以使用 AHK 来规避该限制。只需编写这个脚本,编译它,运行它,瞧:
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: