Skip to content

Instantly share code, notes, and snippets.

@mtso
Last active May 27, 2022 13:38
Show Gist options
  • Select an option

  • Save mtso/1a85146da3e9d3a85cb4eb57d7cc3b12 to your computer and use it in GitHub Desktop.

Select an option

Save mtso/1a85146da3e9d3a85cb4eb57d7cc3b12 to your computer and use it in GitHub Desktop.

Revisions

  1. mtso revised this gist May 27, 2022. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions info.txt
    Original file line number Diff line number Diff line change
    @@ -7,3 +7,5 @@ From caps_lock to left_command.

    Complex:
    Double left_command to caps lock!

    Location: `$HOME/.config/karabiner/assets/complex_modifications`
  2. mtso created this gist May 27, 2022.
    73 changes: 73 additions & 0 deletions double_command_to_caps_lock.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,73 @@
    {
    "title": "Double left_command to become caps_lock",
    "rules": [
    {
    "description": "Double left_command to become caps_lock.",
    "manipulators": [
    {
    "conditions": [
    {
    "name": "left_command pressed",
    "type": "variable_if",
    "value": 1
    }
    ],
    "from": {
    "key_code": "left_command",
    "modifiers": {
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "caps_lock"
    }
    ],
    "type": "basic"
    },
    {
    "from": {
    "key_code": "left_command",
    "modifiers": {
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "set_variable": {
    "name": "left_command pressed",
    "value": 1
    }
    },
    {
    "key_code": "left_command"
    }
    ],
    "to_delayed_action": {
    "to_if_canceled": [
    {
    "set_variable": {
    "name": "left_command pressed",
    "value": 0
    }
    }
    ],
    "to_if_invoked": [
    {
    "set_variable": {
    "name": "left_command pressed",
    "value": 0
    }
    }
    ]
    },
    "type": "basic"
    }
    ]
    }
    ]
    }
    9 changes: 9 additions & 0 deletions info.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    https://github.com/pqrs-org/KE-complex_modifications
    https://github.com/pqrs-org/Karabiner-Elements


    Simple Modifications:
    From caps_lock to left_command.

    Complex:
    Double left_command to caps lock!