Created
June 27, 2018 17:55
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"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" | |
} | |
] | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.