40

At home I'm running Fedora 17, and I've grown accustomed to quickly scanning through open tabs by using the mouse wheel while hovering over the tab bar. It's a very natural gesture for me now.

At least once a week at work (usually Mondays), I attempt to use the same technique on chrome running on a MacBook Pro, but the tabs won't budge. This is starting to make me crazy.

Does anyone have a solution which will allow me to use the scroll wheel to change tabs on google chrome for OSX?

(I found the following google code thread, but the suggested fix does not address the issue as far as I can tell -- http://code.google.com/p/chrome-convenience-extension/issues/detail?id=31)

7
  • 1
    Did you ever find a solution?
    – Some Guy
    Feb 21, 2014 at 15:36
  • 2
    In Chrome on Ubuntu, this behavior is enabled by default; if the mouse is on the tab bar when I scroll, it switches tabs. I'd very much like a way to turn this behavior off. Feb 27, 2017 at 18:02
  • @KeithThompson what would you prefer to happen when you scroll while hovering the tab bar? Jan 29, 2020 at 9:31
  • 1
    @MihailMalostanidis: I'd prefer for nothing to happen.And that appears to be the current behavior (I'm using Chrome on Windows 10 at the moment). Jan 29, 2020 at 20:37
  • I've been doing this with Chrome on Xubuntu (XFCE4) for countless of years. I just upgraded Chrome, and now it doesn't work all of the sudden. Scrambling net for a way to get this back. Why was it removed?
    – Mike
    Mar 24, 2021 at 16:42

9 Answers 9

12

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

3
  • 1
    Very old answer but still useful as it seems google still hasn't added a way to do it. Thanks! I made a quick updated version - the tab bar is currently 34px, and the script was triggering if the mouse was anywhere higher than the window, or to the sides. Also made it work based on the hovered window, even if it's not the focused one, like on Linux. pastebin.com/9LxpgCw3
    – Bali Balo
    Jul 13, 2020 at 2:45
  • Worked for me when I changed to #IfWinActive Google Chrome but then it stopped. See @LiveWireBT answer which worked for me Sep 5, 2020 at 15:18
  • The yaxis number (23) may be a little small on highdpi monitors, 46 worked for me. You can use the HotKey Window Spy to get the coordinates. May 27, 2021 at 14:22
8

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.

3
  • 2
    These options seem to be missing from my install of the Chrome Toolbox extension. It seems to be OS-dependent. Still looking for a solution...
    – user636685
    Jan 18, 2013 at 14:42
  • Most of the tab options (including the scroll mouse option) aren't available in OS X.
    – namuol
    Sep 16, 2013 at 4:09
  • 13
    The extension is broken in current chrome versions and has been removed from the extension store. Dec 30, 2013 at 12:23
3

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
1
  • There is one flaw in this answer: it's about a Windows specific implementation and it doesn't explain how the code works so that it could be ported to scripting environments available on other platforms.
    – LiveWireBT
    Mar 21, 2016 at 1:21
2

I have no issues with Chrome/Chromium on Ubuntu, the functionality you describe just works for me. However I currently have¹ to use Chrome on Windows where I miss this functionality.

As some have mentioned, there exist some implementations in scripting languages² like AutoHotKey, which is only for Windows and I never felt the need to run AutoHotKey, AutoIt or any similar software on Linux/OSX; but as I understand it AutoKey and Automator should be equivalent pieces of software. So it should be possible to re-implement the sending of basic keystrokes in those languages for the specific platform.

Here is the solution that currently works for me: AutoHotKey Community - tab_switcher - switch tabs with mousewheel in any tabbed window

Hello,

here is another script for switching tabs with the mousewheel - this example script is for Chrome, Firefox and Internet Explorer, but also usable for any other program.

TabJumper(psWindowClass, piStripeYStart, piStripeYEnd)
{
    WinGet, idSearchWindow, ID, ahk_class %psWindowClass%
    MouseGetPos, iMouseX, iMouseY, idHoverWindow
    if (idSearchWindow=idHoverWindow
        && iMouseY>=piStripeYStart
        && iMouseY<=piStripeYEnd ) {
        
        ControlFocus,, ahk_id %idHoverWindow%
        if RegExMatch(A_ThisHotkey, "i).*wheelup.*")
        {
            ControlSend, ahk_parent, {Control Down}{Shift Down}{Tab Down}, ahk_id %idHoverWindow%
            Sleep, 60
            ControlSend, ahk_parent, {Tab Up}{Shift Up}{Control Up}, ahk_id %idHoverWindow%
        }
        else if RegExMatch(A_ThisHotkey, "i).*wheeldown.*")
        {
            ControlSend, ahk_parent, {Control Down}{Tab Down}, ahk_id %idHoverWindow%
            Sleep, 60
            ControlSend, ahk_parent, {Tab Up}{Control Up}, ahk_id %idHoverWindow%
        }
    }
}

Usage example for chrome:

#SingleInstance, force

~WheelUp::
    TabJumper("Chrome_WidgetWin_1", 8, 88)
return

~WheelDown::
    TabJumper("Chrome_WidgetWin_1", 8, 88)
return

Parameters explained:

  • TabJumper([Window class], [horizontal reaction stripe y axis start], [[horizontal reaction y axis end]])

    Whats about this "horizontal reaction stripe"?

    This means only in this stripe of a window tabs are switched, the other part of the window reacts normally with mouse wheel like e.g. scrolling up and down a web page.

Usage: Yes, just installing AutoHotKey, creating a new .ahk file, pasting both code blocks and executing the script brings you the functionality. (Additional markup added by me.)

To help with the understanding: {Control Down}{Shift Down}{Tab Down} and {Tab Up}{Shift Up}{Control Up} are the keystrokes, one is the sequence for pressing and holding Crtl+Shift+Tab, the other for releasing them. Here is the list with keyboard shortcuts from Chrome.


  1. I personally prefer Firefox over Chromium/Chrome on all my devices, but at work a certain software manufacturer is unable to publish the vital browser extension as a signed Firefox extension (and MS Edge) for the particular product. Regarding Google desktop software, at the time of writing most of it is inferior outside the twenty-somthing techbro doing terminal stuff in a web browser with a Chromebook usecase from my point of view.
  2. Running a separate script for this (basic) functionality is wrong and overkill. I completely agree with everyone on that opinion.
1
  • Works beautifully, I just changed arguments to TabJumper("Chrome_WidgetWin_1", 0, 43) to match current layout Sep 5, 2020 at 15:17
2

There's a Chrome extension for Windows users called AutoControl that adds this feature to the browser.
Instructions here:
https://www.autocontrol.app/hover-sensitive-shortcuts#scrollwheel-on-tabs

You can make the scroll wheel to switch tabs either when the mouse is over the tab strip or when it's over the entire title area or when it's anywhere over the browser window or whatever you want.
You can also combine the scroll wheel with CTRL, SHIFT, ALT or other mouse buttons or virtually any combination you can think of. It has more configurability than any other app I've seen.

1
  1. Download and install X-Mouse Button Control.
  2. Open "Setup" from tray menu.
  3. Add a new profile for Chrome. Refer to the image below. Strings to copy: chrome.exe, Intermediate D3D Window, Chrome_WidgetWin_1, Google Chrome Tab Scroll.enter image description here
  4. Choose Simulated Keys for Wheel Up: enter image description here
  5. Enter {CTRL}{PGUP}, Check the "Only send if profile's process is active" option, and press OK. enter image description here
  6. Repeat 4 for Wheel Down.
  7. Repeat 5 with {CTRL}{PGDN}.
  8. Click on Apply.

Aaaand you're done 🎉

1
  • Amazing application. Thanks! Newer versions of Chrome appear to no longer have "Intermediate D3D Window". Instead, "Chrome_WidgetWin_1" goes into "Class" directly, with "Parent Class" empty. Sep 7, 2021 at 0:41
0

There is a simple chrome extension which allow you to scroll tabs with alt + mouse wheel up / down:

https://chrome.google.com/webstore/detail/tab-wheel-scroll/aknfcgiicpmnfhncpljcadokcghjblal?hl=fr

2
  • 3
    If you are the author of this extension, please disclose your affiliation with it.
    – slhck
    Aug 23, 2014 at 7:51
  • 1
    And if not, please disclaim affiliation.
    – Daniel H
    Sep 11, 2017 at 15:12
0

Chrome has a configuration flag for this:

  • Open Google Chrome.
  • Copy and paste the following string in the address bar: chrome://flags/#scrollable-tabstrip
  • Enable Scrollable TabStrip flag.
  • Relaunch the browser.
1
  • 3
    This does not answer the question. That flag makes the tab strip to grow wider than the available space. When that happens, you can use the scroll wheel to reveal the hidden parts of the tab strip.
    – Mercalli
    Jan 5, 2022 at 15:04
0

It can be done with Windhawk mod:

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .