Skip to content

Instantly share code, notes, and snippets.

@IcedMango
Last active November 10, 2023 11:26
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save IcedMango/ca8485452c62fe049e3178785a097c7b to your computer and use it in GitHub Desktop.
Save IcedMango/ca8485452c62fe049e3178785a097c7b to your computer and use it in GitHub Desktop.
Enable double tap cmd/option toggle for Raycast using karabiner
{
"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