Skip to content

Instantly share code, notes, and snippets.

@jakebathman
Created March 20, 2019 14:09
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 jakebathman/aab24444249dc19b4a00fa493a7d2aff to your computer and use it in GitHub Desktop.
Save jakebathman/aab24444249dc19b4a00fa493a7d2aff to your computer and use it in GitHub Desktop.
Karabiner rule for double-press left shift -> caps lock
{
"description": "Double left shift to caps_lock",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "left_shift",
"modifiers": {
"optional": ["any"]
}
},
"to": [
{
"key_code": "caps_lock"
}
],
"conditions": [
{
"type": "variable_if",
"name": "left_shift pressed",
"value": 1
}
]
},
{
"type": "basic",
"from": {
"key_code": "left_shift",
"modifiers": {
"optional": ["any"]
}
},
"to": [
{
"set_variable": {
"name": "left_shift pressed",
"value": 1
}
},
{
"key_code": "left_shift"
}
],
"to_delayed_action": {
"to_if_invoked": [
{
"set_variable": {
"name": "left_shift pressed",
"value": 0
}
}
],
"to_if_canceled": [
{
"set_variable": {
"name": "left_shift pressed",
"value": 0
}
}
]
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment