{
  "description": "Caps Lock Hyper with Vim arrows and Option navigation",
  "manipulators": [
    {
      "type": "basic",
      "from": {
        "key_code": "h",
        "modifiers": {
          "mandatory": ["control", "option", "command"],
          "optional": ["shift"]
        }
      },
      "to": [
        {
          "key_code": "left_arrow"
        }
      ],
      "conditions": [
        {
          "type": "variable_if",
          "name": "vim_arrow_layer",
          "value": 1
        }
      ]
    },
    {
      "type": "basic",
      "from": {
        "key_code": "j",
        "modifiers": {
          "mandatory": ["control", "option", "command"],
          "optional": ["shift"]
        }
      },
      "to": [
        {
          "key_code": "down_arrow"
        }
      ],
      "conditions": [
        {
          "type": "variable_if",
          "name": "vim_arrow_layer",
          "value": 1
        }
      ]
    },
    {
      "type": "basic",
      "from": {
        "key_code": "k",
        "modifiers": {
          "mandatory": ["control", "option", "command"],
          "optional": ["shift"]
        }
      },
      "to": [
        {
          "key_code": "up_arrow"
        }
      ],
      "conditions": [
        {
          "type": "variable_if",
          "name": "vim_arrow_layer",
          "value": 1
        }
      ]
    },
    {
      "type": "basic",
      "from": {
        "key_code": "l",
        "modifiers": {
          "mandatory": ["control", "option", "command"],
          "optional": ["shift"]
        }
      },
      "to": [
        {
          "key_code": "right_arrow"
        }
      ],
      "conditions": [
        {
          "type": "variable_if",
          "name": "vim_arrow_layer",
          "value": 1
        }
      ]
    },
    {
      "type": "basic",
      "from": {
        "key_code": "h",
        "modifiers": {
          "mandatory": ["option"],
          "optional": ["shift"]
        }
      },
      "to": [
        {
          "key_code": "left_arrow",
          "modifiers": ["option"]
        }
      ]
    },
    {
      "type": "basic",
      "from": {
        "key_code": "j",
        "modifiers": {
          "mandatory": ["option"],
          "optional": ["shift"]
        }
      },
      "to": [
        {
          "key_code": "down_arrow",
          "modifiers": ["option"]
        }
      ]
    },
    {
      "type": "basic",
      "from": {
        "key_code": "k",
        "modifiers": {
          "mandatory": ["option"],
          "optional": ["shift"]
        }
      },
      "to": [
        {
          "key_code": "up_arrow",
          "modifiers": ["option"]
        }
      ]
    },
    {
      "type": "basic",
      "from": {
        "key_code": "l",
        "modifiers": {
          "mandatory": ["option"],
          "optional": ["shift"]
        }
      },
      "to": [
        {
          "key_code": "right_arrow",
          "modifiers": ["option"]
        }
      ]
    },
    {
      "type": "basic",
      "from": {
        "key_code": "caps_lock",
        "modifiers": {
          "optional": ["any"]
        }
      },
      "to": [
        {
          "set_variable": {
            "name": "vim_arrow_layer",
            "value": 1
          }
        },
        {
          "key_code": "left_control",
          "modifiers": ["left_option", "left_command"]
        }
      ],
      "to_after_key_up": [
        {
          "set_variable": {
            "name": "vim_arrow_layer",
            "value": 0
          }
        }
      ],
      "to_if_alone": [
        {
          "key_code": "caps_lock"
        }
      ]
    }
  ]
}
