Blocking control-mousewheel in browsers
For whatever reason I find myself accidentally inputting control-mousewheel events in my browsers a lot. In both Chrome and Firefox this changes the zoom level of the page, something I pretty much never intend to do. (And if I do, I use Ctrl-Plus and Ctrl-Minus instead.) One fix for this I’ve been using for years is a small AutoHotKey script that captures those events and cancels them.
#IfWinActive ahk_class Chrome_WidgetWin_1
{
^WheelDown::return
^WheelUp::return
#MaxHotkeysPerInterval 1000
}
#IfWinActive ahk_class MozillaWindowClass
{
^WheelDown::return
^WheelUp::return
#MaxHotkeysPerInterval 1000
}
The ahk_class of a window can be found with the “Windows Spy” program that’s included with AHK.