Created
July 25, 2021 17:05
-
-
Save dceddia/2348cba2de0fa414d4f74972b106f3b9 to your computer and use it in GitHub Desktop.
Karabiner Elements script to map [double tap left Cmd] to [Cmd+L] (to focus the address bar in Chrome)
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": "Rules for Karabiner-Elements", | |
"rules": [ | |
{ "description": "Press left_command twice to send Cmd+L (Focus Address Bar in Chrome)", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "left_command", | |
"modifiers": { | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "l", | |
"modifiers": ["left_command"] | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "key pressed", | |
"value": 1 | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "left_command", | |
"modifiers": { | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"set_variable": { | |
"name": "key pressed", | |
"value": 1 | |
} | |
}, | |
{ | |
"key_code": "left_command" | |
} | |
], | |
"description": "to_delayed_action is set to 400ms in karabiner.json", | |
"to_delayed_action": { | |
"to_if_invoked": [ | |
{ | |
"set_variable": { | |
"name": "key pressed", | |
"value": 0 | |
} | |
} | |
], | |
"to_if_canceled": [ | |
{ | |
"set_variable": { | |
"name": "key pressed", | |
"value": 0 | |
} | |
} | |
] | |
} | |
} | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment