Skip to content

Instantly share code, notes, and snippets.

@yamaya
Created April 16, 2020 13:39
Show Gist options
  • Save yamaya/1b27bf48c8fa8f732c7590ead764585b to your computer and use it in GitHub Desktop.
Save yamaya/1b27bf48c8fa8f732c7590ead764585b to your computer and use it in GitHub Desktop.
Karabiner-Elements: Mouse イベントをスクロールホイールに変換する - Button4でトグルする
{
"maintainers": [
"yamaya"
],
"rules": [
{
"available_since": "12.3.0",
"description": "Convert mouse move to scroll wheel (Toggle with button4)",
"manipulators": [
{
"conditions": [
{
"name": "enable_mouse_motion_to_scroll",
"type": "variable_if",
"value": 0
}
],
"from": {
"modifiers": {
"optional": [
"any"
]
},
"pointing_button": "button4"
},
"to": [
{
"set_variable": {
"name": "enable_mouse_motion_to_scroll",
"value": 1
}
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "enable_mouse_motion_to_scroll",
"type": "variable_if",
"value": 1
}
],
"from": {
"modifiers": {
"optional": [
"any"
]
},
"pointing_button": "button4"
},
"to": [
{
"set_variable": {
"name": "enable_mouse_motion_to_scroll",
"value": 0
}
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "enable_mouse_motion_to_scroll",
"type": "variable_if",
"value": 1
}
],
"from": {
"modifiers": {
"optional": [
"any"
]
}
},
"type": "mouse_motion_to_scroll"
}
]
}
],
"title": "Change mouse motion to scroll"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment