{
  "title": "Personal rules (@GilDev)",
  "rules": [
    {
      "description": "TypeMatrix 2030: Change desktop key to escape",
      "manipulators": [
        {
          "conditions": [
            {
              "type": "device_if",
              "identifiers": [
                {
                  "vendor_id": 7764,
                  "product_id": 8240
                }
              ]
            }
          ],
          "type": "basic",
          "from": {
            "key_code": "d",
            "modifiers": {
              "mandatory": [
                "left_option"
              ],
              "optional": [
                "any"
              ]
            }
          },
          "to": [
            {
              "key_code": "escape"
            }
          ]
        }
      ]
    },
    {
      "description": "TypeMatrix 2030: Swap left option and left command",
      "manipulators": [
        {
          "conditions": [
            {
              "type": "device_if",
              "identifiers": [
                {
                  "vendor_id": 7764,
                  "product_id": 8240
                }
              ]
            }
          ],
          "type": "basic",
          "from": {
            "key_code": "left_option",
            "modifiers": {
              "optional": [
                "any"
              ]
            }
          },
          "to": [
            {
              "key_code": "left_command"
            }
          ]
        },
        {
          "conditions": [
            {
              "type": "device_if",
              "identifiers": [
                {
                  "vendor_id": 7764,
                  "product_id": 8240
                }
              ]
            }
          ],
          "type": "basic",
          "from": {
            "key_code": "left_command",
            "modifiers": {
              "optional": [
                "any"
              ]
            }
          },
          "to": [
            {
              "key_code": "left_option"
            }
          ]
        }
      ]
    },
    {
      "description": "Apple keyboards: Swap right option and right command (useful for having “AltGr” under the right thumb to type in Bépo)",
      "manipulators": [
        {
          "conditions": [
            {
              "type": "device_if",
              "identifiers": [
                {
                  "vendor_id": 1452,
                  "product_id": 595
                }
              ]
            }
          ],
          "type": "basic",
          "from": {
            "key_code": "right_option",
            "modifiers": {
              "optional": [
                "any"
              ]
            }
          },
          "to": [
            {
              "key_code": "right_command"
            }
          ]
        },
        {
          "conditions": [
            {
              "type": "device_if",
              "identifiers": [
                {
                  "vendor_id": 1452,
                  "product_id": 595
                }
              ]
            }
          ],
          "type": "basic",
          "from": {
            "key_code": "right_command",
            "modifiers": {
              "optional": [
                "any"
              ]
            }
          },
          "to": [
            {
              "key_code": "right_option"
            }
          ]
        }
      ]
    }
  ]
}
