Last active
November 10, 2023 11:26
-
-
Save IcedMango/ca8485452c62fe049e3178785a097c7b to your computer and use it in GitHub Desktop.
Enable double tap cmd/option toggle for Raycast using karabiner
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": "Raycast Karabiner Config", | |
"rules": [ | |
{ | |
"description": "Double click cmd Toggle Raycast(Hotkey: ctrl+option+cmd+Esc)", | |
"manipulators": [ | |
{ | |
"conditions": [ | |
{ | |
"name": "command_pressed", | |
"type": "variable_if", | |
"value": 1 | |
} | |
], | |
"from": { | |
"key_code": "left_command", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "escape", | |
"modifiers": [ | |
"left_control", | |
"left_alt", | |
"left_command" | |
] | |
} | |
], | |
"type": "basic" | |
}, | |
{ | |
"from": { | |
"key_code": "left_command", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"set_variable": { | |
"name": "command_pressed", | |
"value": 1 | |
} | |
}, | |
{ | |
"key_code": "left_command" | |
} | |
], | |
"to_delayed_action": { | |
"to_if_canceled": [ | |
{ | |
"set_variable": { | |
"name": "command_pressed", | |
"value": 0 | |
} | |
} | |
], | |
"to_if_invoked": [ | |
{ | |
"set_variable": { | |
"name": "command_pressed", | |
"value": 0 | |
} | |
} | |
] | |
}, | |
"type": "basic" | |
} | |
] | |
}, | |
{ | |
"description": "Double click option toggle Raycast clipboard (Hotkey: ctrl+option+cmd+F1)", | |
"manipulators": [ | |
{ | |
"conditions": [ | |
{ | |
"name": "option_pressed", | |
"type": "variable_if", | |
"value": 1 | |
} | |
], | |
"from": { | |
"key_code": "left_option", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "f1", | |
"modifiers": [ | |
"left_control", | |
"left_alt", | |
"left_command" | |
] | |
} | |
], | |
"type": "basic" | |
}, | |
{ | |
"from": { | |
"key_code": "left_option", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"set_variable": { | |
"name": "option_pressed", | |
"value": 1 | |
} | |
}, | |
{ | |
"key_code": "left_option" | |
} | |
], | |
"to_delayed_action": { | |
"to_if_canceled": [ | |
{ | |
"set_variable": { | |
"name": "option_pressed", | |
"value": 0 | |
} | |
} | |
], | |
"to_if_invoked": [ | |
{ | |
"set_variable": { | |
"name": "option_pressed", | |
"value": 0 | |
} | |
} | |
] | |
}, | |
"type": "basic" | |
} | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment