Created
February 26, 2018 10:09
-
-
Save patrickwelker/a4998af276b146f25121d1b991767bf0 to your computer and use it in GitHub Desktop.
Karabiner Elements Setup for Evoluent Vertical Mouse
This file contains hidden or 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
{ | |
"title": "AAA Demo – Tap, Hold & Secondary Function", | |
"rules": [ | |
{ "description": "Button4 ••• CLICK=> Show Desktop, HOLD=> Mission Control & SECONDARY FUNCTIONS •••••••••••••••••• (HOLD+BUTTON1=> Next Tab, HOLD+BUTTON2=> Previous Tab, HOLD+BUTTON3=> Close Window, HOLD+BUTTON5=> Panic Button)", | |
"manipulators": [ | |
{ | |
"from": { | |
"pointing_button": "button4", | |
"modifiers": { | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"parameters": { | |
"basic.to_if_alone_timeout_milliseconds": 250, | |
"basic.to_if_held_down_threshold_milliseconds": 3000 | |
}, | |
"to": [ | |
{ | |
"set_variable": { | |
"name": "button4_secondary", | |
"value": 1 | |
} | |
} | |
], | |
"to_after_key_up": [ | |
{ | |
"set_variable": { | |
"name": "button4_secondary", | |
"value": 0 | |
} | |
} | |
], | |
"to_if_alone": [ | |
{ | |
"_comment": "Show Desktop", | |
"shell_command": "'/Applications/Mission Control.app/Contents/MacOS/Mission Control' 1" | |
} | |
], | |
"to_if_held_down": [ | |
{ | |
"_comment": "Mission Control", | |
"shell_command": "open -a 'Mission Control.app'", | |
"lazy": true | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "device_if", | |
"identifiers": [ | |
{ | |
"description": "Evoluent VerticalMouse 4", | |
"is_pointing_device": true, | |
"vendor_id": 6780, | |
"product_id": 401 | |
} | |
] | |
} | |
], | |
"type": "basic" | |
}, | |
{ "_comment": "HOLD+BUTTON1=> Next Tab (⌘⌥ + →)", | |
"conditions": [ | |
{ | |
"name": "button4_secondary", | |
"type": "variable_if", | |
"value": 1 | |
} | |
], | |
"from": { | |
"pointing_button": "button1", | |
"modifiers": { | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "right_arrow", | |
"modifiers": [ | |
"left_option", | |
"left_command" | |
] | |
} | |
], | |
"type": "basic" | |
}, | |
{ "_comment": "HOLD+BUTTON2=> Previous Tab (⌘⌥ + ←)", | |
"conditions": [ | |
{ | |
"name": "button4_secondary", | |
"type": "variable_if", | |
"value": 1 | |
} | |
], | |
"from": { | |
"pointing_button": "button2", | |
"modifiers": { | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "left_arrow", | |
"modifiers": [ | |
"left_option", | |
"left_command" | |
] | |
} | |
], | |
"type": "basic" | |
}, | |
{ "_comment": "HOLD+BUTTON3=> Close Window (⌘W)", | |
"conditions": [ | |
{ | |
"name": "button4_secondary", | |
"type": "variable_if", | |
"value": 1 | |
} | |
], | |
"from": { | |
"pointing_button": "button3", | |
"modifiers": { | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "w", | |
"modifiers": [ | |
"left_command" | |
] | |
} | |
], | |
"type": "basic" | |
}, | |
{ "_comment": "HOLD+BUTTON5=> Panic Button", | |
"conditions": [ | |
{ | |
"name": "button4_secondary", | |
"type": "variable_if", | |
"value": 1 | |
} | |
], | |
"from": { | |
"pointing_button": "button5", | |
"modifiers": { | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "z", | |
"modifiers": [ | |
"left_command", | |
"left_option", | |
"left_control", | |
"left_shift" | |
] | |
} | |
], | |
"type": "basic" | |
} | |
] | |
}, | |
{ "description": "Button6 ••• CLICK=> Minimize window under cursor, HOLD=> Witch App Switcher", | |
"manipulators": [ | |
{ | |
"from": { | |
"pointing_button": "button6", | |
"modifiers": { | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"parameters": { | |
"basic.to_if_alone_timeout_milliseconds": 250, | |
"basic.to_if_held_down_threshold_milliseconds": 250 | |
}, | |
"to_if_alone": [ | |
{ | |
"_comment": "Minimize window under cursor (via BetterTouchTool)", | |
"shell_command": "open btt://7BEB8FB6-1AB2-4F65-AAB9-5A4C3C9BBDC9" | |
} | |
], | |
"to_if_held_down": [ | |
{ | |
"_comment": "Open Witch App Switcher #2", | |
"key_code": "quote", | |
"modifiers": [ | |
"left_command", | |
"left_option", | |
"left_control", | |
"left_shift" | |
], | |
"lazy": true | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "device_if", | |
"identifiers": [ | |
{ | |
"description": "Evoluent VerticalMouse 4", | |
"is_pointing_device": true, | |
"vendor_id": 6780, | |
"product_id": 401 | |
} | |
] | |
} | |
], | |
"type": "basic" | |
} | |
] | |
}, | |
{ "description": "Button2 ••• CLICK=> [default], HOLD=> Show Menubar in Context Menu & SECONDARY FUNCTIONS ••• (HOLD+BUTTON1=> Paste Frontmost URL, HOLD+BUTTON3=> Paste Frontmost URL as Markdown Inline Link)", | |
"manipulators": [ | |
{ | |
"from": { | |
"pointing_button": "button2", | |
"modifiers": { | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"parameters": { | |
"basic.to_if_alone_timeout_milliseconds": 250, | |
"basic.to_if_held_down_threshold_milliseconds": 1000 | |
}, | |
"to": [ | |
{ | |
"set_variable": { | |
"name": "button2_secondary", | |
"value": 1 | |
} | |
} | |
], | |
"to_after_key_up": [ | |
{ | |
"set_variable": { | |
"name": "button2_secondary", | |
"value": 0 | |
} | |
} | |
], | |
"to_if_alone": [ | |
{ | |
"pointing_button": "button2" | |
} | |
], | |
"to_if_held_down": [ | |
{ | |
"_comment": "Show Menubar in Context Menu.", | |
"shell_command": "open btt://5807B0C3-5174-4992-B281-12B49A586296", | |
"lazy": true | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "device_if", | |
"identifiers": [ | |
{ | |
"description": "Evoluent VerticalMouse 4", | |
"is_pointing_device": true, | |
"vendor_id": 6780, | |
"product_id": 401 | |
} | |
] | |
} | |
], | |
"type": "basic" | |
}, | |
{ "_comment": "HOLD+BUTTON1=> Paste Frontmost URL (via Keyboard Maestro)", | |
"conditions": [ | |
{ | |
"name": "button2_secondary", | |
"type": "variable_if", | |
"value": 1 | |
} | |
], | |
"from": { | |
"pointing_button": "button1", | |
"modifiers": { | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"shell_command": "osascript -e 'tell application \"Keyboard Maestro Engine\" to do script \"URL: Paste URL\"'" | |
} | |
], | |
"type": "basic" | |
}, | |
{ "_comment": "HOLD+BUTTON3=> Paste Frontmost URL as Markdown Inline Link (via Keyboard Maestro)", | |
"conditions": [ | |
{ | |
"name": "button2_secondary", | |
"type": "variable_if", | |
"value": 1 | |
} | |
], | |
"from": { | |
"pointing_button": "button3", | |
"modifiers": { | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"shell_command": " osascript -e 'tell application \"Keyboard Maestro Engine\" to do script \"URL: Paste MD Link\"'" | |
} | |
], | |
"type": "basic" | |
} | |
] | |
}, | |
{ "description": "Button3 ••• CLICK=> [default], HOLD=> Siri & SECONDARY FUNCTIONS ••• (HOLD+BUTTON1=> Merge Clipboard, HOLD+BUTTON3=> Paste Frontmost URL as Markdown Inline Link)", | |
"manipulators": [ | |
{ | |
"from": { | |
"pointing_button": "button3", | |
"modifiers": { | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"parameters": { | |
"basic.to_if_alone_timeout_milliseconds": 250, | |
"basic.to_if_held_down_threshold_milliseconds": 400 | |
}, | |
"to": [ | |
{ | |
"set_variable": { | |
"name": "button3_secondary", | |
"value": 1 | |
} | |
} | |
], | |
"to_after_key_up": [ | |
{ | |
"set_variable": { | |
"name": "button3_secondary", | |
"value": 0 | |
} | |
} | |
], | |
"to_if_alone": [ | |
{ | |
"pointing_button": "button3" | |
} | |
], | |
"to_if_held_down": [ | |
{ | |
"_comment": "Siri", | |
"shell_command": "open -a Siri.app", | |
"lazy": true | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "device_if", | |
"identifiers": [ | |
{ | |
"description": "Evoluent VerticalMouse 4", | |
"is_pointing_device": true, | |
"vendor_id": 6780, | |
"product_id": 401 | |
} | |
] | |
} | |
], | |
"type": "basic" | |
}, | |
{ "_comment": "HOLD+BUTTON1=> Append to the Clipboard (via Keyboard Maestro)", | |
"conditions": [ | |
{ | |
"name": "button3_secondary", | |
"type": "variable_if", | |
"value": 1 | |
} | |
], | |
"from": { | |
"pointing_button": "button1", | |
"modifiers": { | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"shell_command": "osascript -e 'tell application \"Keyboard Maestro Engine\" to do script \"Append to the Clipboard\"'" | |
} | |
], | |
"type": "basic" | |
} | |
] | |
}, | |
{ "description": "Button5 ••• CLICK=> Lookup word under cursor, HOLD=> Quit App", | |
"manipulators": [ | |
{ | |
"from": { | |
"pointing_button": "button5", | |
"modifiers": { | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"parameters": { | |
"basic.to_if_alone_timeout_milliseconds": 250, | |
"basic.to_if_held_down_threshold_milliseconds": 250 | |
}, | |
"to_if_alone": [ | |
{ | |
"_comment": "Lookup word under cursor (via BetterTouchTool)", | |
"key_code": "f14", | |
"modifiers": [ | |
"left_command", | |
"left_option", | |
"left_control", | |
"left_shift" | |
] | |
} | |
], | |
"to_if_held_down": [ | |
{ | |
"_comment": "Quit App", | |
"key_code": "q", | |
"modifiers": [ | |
"left_command" | |
], | |
"lazy": true | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "device_if", | |
"identifiers": [ | |
{ | |
"description": "Evoluent VerticalMouse 4", | |
"is_pointing_device": true, | |
"vendor_id": 6780, | |
"product_id": 401 | |
} | |
] | |
} | |
], | |
"type": "basic" | |
} | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment