How can I get google chrome to switch tabs using the mouse wheel?

Found a solution on a Google Groups thread. Use AutoHotKey with the following script:

;; Wheel Scroll Tabs for Google Chrome 

#IfWinActive ahk_class Chrome_WidgetWin_1 
 ~$WheelDown:: 
 ~$WheelUp:: 
    MouseGetPos,, yaxis 
    IfGreater,yaxis,23, Return 
    IfEqual,A_ThisHotkey,~$WheelDown, Send ^{PgDn} 
                                 Else Send ^{PgUp} 
Return 
#IfWinActive

Note: I've changed it to Chrome_WidgetWin_1 because that's what worked for me. If that doesn't work for you, try changing it to Chrome_WidgetWin_0

Source


The extension Chrome Toolbox might be of interest to you:

Chrome Toolbox Options

I have not tested it on OSX but it's working for Windows 7 and there should not be compatibility problems there.


If you are using Chrome 32+ check this solution with AutoHotKey (compiled script). Chrome Toolbox is not working on Chrome above 31.

https://plus.google.com/115670442023408995787/posts/WYPqqk2j9UB

Or use directly:

; Mouse Wheel Tab Scroll 4 Chrome
; -------------------------------
; Scroll though Chrome tabs with your mouse wheel when hovering over the tab bar.
; If the Chrome window is inactive when starting to scroll, it will be activated.

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
#Warn   ; Enable warnings to assist with detecting common errors.
#SingleInstance force   ; Determines whether a script is allowed to run again when it is already running.
#UseHook Off    ; Using the keyboard hook is usually preferred for hotkeys - but here we only need the mouse hook.
#InstallMouseHook
#MaxHotkeysPerInterval 1000 ; Avoids warning messages for high speed wheel users.

SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
Menu, Tray, Tip, Mousewheel tab scroll for Chrome (1.0.3)

WheelUp::
WheelDown::
    MouseGetPos,, ypos, id
    WinGetClass, class, ahk_id %id%
    If (ypos < 45 and InStr(class,"Chrome_WidgetWin"))
    {
        IfWinNotActive ahk_id %id%
            WinActivate ahk_id %id%
        If A_ThisHotkey = WheelUp
            Send ^{PgUp}
        Else
            Send ^{PgDn}
    }
    Else
    {
        If A_ThisHotkey = WheelUp
            Send {WheelUp}
        Else
            Send {WheelDown}
    }
    Return