Skip to content

Instantly share code, notes, and snippets.

@dceddia
Created July 25, 2021 17:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dceddia/2348cba2de0fa414d4f74972b106f3b9 to your computer and use it in GitHub Desktop.
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)
{"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