Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save OKsign/7361f3a4dab21599bc61f6b63ca0eaa1 to your computer and use it in GitHub Desktop.

Select an option

Save OKsign/7361f3a4dab21599bc61f6b63ca0eaa1 to your computer and use it in GitHub Desktop.
{"title": "Rules for Karabiner-Elements | Tested Version: 11.6.0",
"rules": [
{ "description": "Press a Key Twice - Rule - Karabiner-Elements",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "mykey",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"shell_command": "osascript -e 'run script \"Replace_Me\"'"
}
],
"conditions": [
{
"type": "variable_if",
"name": "key pressed",
"value": 1
}
]
},
{
"type": "basic",
"from": {
"key_code": "mykey",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"set_variable": {
"name": "key pressed",
"value": 1
}
},
{
"key_code": "mykey"
}
],
"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