Skip to content

Instantly share code, notes, and snippets.

@OhCoder
Last active February 26, 2024 15:28
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 OhCoder/dc77ba07e91e8019fa04471ee6c54a05 to your computer and use it in GitHub Desktop.
Save OhCoder/dc77ba07e91e8019fa04471ee6c54a05 to your computer and use it in GitHub Desktop.
{
"description": "jk to escape for xcode",
"manipulators": [
{
"conditions": [
{
"bundle_identifiers": [
"com.apple.dt.Xcode"
],
"type": "frontmost_application_if"
},
{
"name": "j_pressed",
"type": "variable_unless",
"value": 1
}
],
"from": {
"key_code": "j"
},
"parameters": {
"basic.to_delayed_action_delay_milliseconds": 500
},
"to": [
{
"set_variable": {
"name": "j_pressed",
"value": 1
}
}
],
"to_delayed_action": {
"to_if_canceled": [
{
"set_variable": {
"name": "j_pressed",
"value": 1
}
}
],
"to_if_invoked": [
{
"set_variable": {
"name": "j_pressed",
"value": 0
}
}
]
},
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"com.apple.dt.Xcode"
],
"type": "frontmost_application_if"
},
{
"name": "j_pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "k"
},
"to": [
{
"set_variable": {
"name": "j_pressed",
"value": 0
}
},
{
"key_code": "escape",
"modifiers": []
}
],
"type": "basic"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment