SumatraPDF scroll tabs with mouse wheel
Use the mouse wheel while hovering over the tab bar to switch between tabs in SumatraPDF
Author: Martin Kaiser

Use the mouse wheel while hovering over the tab bar of SumatraPDF to switch
between tabs, the same way the "Chrome/Edge scroll tabs with mouse wheel" mod
does it for browsers.
- Scrolling down switches to the next tab (to the right), scrolling up to the
previous tab. SumatraPDF wraps around at both ends. The direction can be
reversed in the settings.
- Only plain wheel events over the tab bar are intercepted. Ctrl+wheel (zoom),
Shift+wheel (horizontal scrolling) and wheel events anywhere else are left to
SumatraPDF.
- Works with the tab bar in SumatraPDF's own title bar (the default with
UseTabs = true) as well as with a plain tab bar below the menu.
- Both the installed (
SumatraPDF.exe) and the portable
(SumatraPDF-x.y.z-64.exe) builds are covered.
How it works
SumatraPDF 3.5 and newer have "Next Tab" / "Previous Tab" commands, bound to
Ctrl+PageDown / Ctrl+PageUp by default. The mod reads the ids of these commands
from the accelerator table SumatraPDF registers and posts the matching command
to the main window, so a wheel notch does exactly the same as pressing the
shortcut.
This means the mod relies on Ctrl+PageDown / Ctrl+PageUp being bound to
"Next Tab" / "Previous Tab". If you rebound these shortcuts to something else
in the advanced settings (Shortcuts), the wheel triggers whatever they are
bound to now.
SumatraPDF versions before 3.5 aren't supported: they have no tab switching
commands and use Ctrl+PageDown / Ctrl+PageUp for page navigation. The mod stays
inactive there.
Credits
Based on the Chrome/Edge scroll tabs with mouse wheel
mod by m417z (GPL-3.0).