All posts

Switch browser tabs with scroll wheel in Mac OS X using Karabiner

1 min read

I have a Kensington Slimblade trackball and wanted an accessible way to switch tabs if my left hand is resting around home row and the right hand is on the trackball.

HotkeyAction
⌘ Scroll Wheel UpSwitch to tab on the left
⌘ Scroll Wheel DownSwitch to tab on the right

Here's the configuration that needs to be added in Karabiner's private.xml:

<item>
  <name>Scroll Wheel to Switch Tabs Back and Forward. (Command+{, Command+})</name>
  <identifier>private.app_google_chrome_scroll_wheel_to_switch_tabs_back_forward</identifier>
  <only>GOOGLE_CHROME</only>
  <autogen>
    __ScrollWheelToKey__ ScrollWheel::UP, ModifierFlag::COMMAND_L,
    KeyCode::BRACKET_LEFT, ModifierFlag::COMMAND_R | ModifierFlag::SHIFT_R
  </autogen>
  <autogen>
    __ScrollWheelToKey__ ScrollWheel::DOWN, ModifierFlag::COMMAND_L,
    KeyCode::BRACKET_RIGHT, ModifierFlag::COMMAND_R | ModifierFlag::SHIFT_R
  </autogen>
</item>

Thanks for reading! You can check out my projects on GitHub or follow me on Twitter.