Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save LukeMurphey/8ac782fc576d9890fb78d1fe871bd76b to your computer and use it in GitHub Desktop.
Save LukeMurphey/8ac782fc576d9890fb78d1fe871bd76b to your computer and use it in GitHub Desktop.
A karabiner rule for using the mouse left and right scroll wheel to the previous and next tab
"rules": [
{
"description": "Mouse right scroll to ctrl+tab (next tab)",
"manipulators": [
{
"from": {
"pointing_button": "button5"
},
"to": [
{
"key_code": "tab",
"modifiers": [
"left_control"
]
}
],
"type": "basic"
}
]
},
{
"description": "Mouse left scroll to shift+ctrl+tab (previous tab)",
"manipulators": [
{
"from": {
"pointing_button": "button4"
},
"to": [
{
"key_code": "tab",
"modifiers": [
"left_control",
"shift"
]
}
],
"type": "basic"
}
]
}
]
@kerryj89
Copy link

kerryj89 commented Dec 2, 2019

FYI if anyone stumbled into this from Google, certain mouses emit scroll left/right as button events like above, but many other mouses will emit a scroll_wheel event with delta values which this snippet unfortunately doesn't support. Still looking to see if there's a way to capture those events and a < 0 or > 0 condition but others who browsed the source code say it's not possible right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment