Skip to content

Instantly share code, notes, and snippets.

@yetone
Last active September 6, 2021 05:02
Show Gist options
  • Save yetone/b29b79b16fb8fec16dbbdc7f39702352 to your computer and use it in GitHub Desktop.
Save yetone/b29b79b16fb8fec16dbbdc7f39702352 to your computer and use it in GitHub Desktop.

Revisions

  1. yetone revised this gist May 1, 2019. 1 changed file with 69 additions and 71 deletions.
    140 changes: 69 additions & 71 deletions karabiner.json
    Original file line number Diff line number Diff line change
    @@ -1,73 +1,71 @@
    ```json
    {
    "description": "Switch between zh-Hans <-> en (left_shift)",
    "manipulators": [
    {
    "conditions": [
    {
    "input_sources": [
    {
    "language": "en"
    }
    ],
    "type": "input_source_if"
    }
    ],
    "from": {
    "key_code": "left_shift",
    "modifiers": {
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "left_shift"
    }
    ],
    "to_if_alone": [
    {
    "select_input_source": {
    "language": "zh-Hans"
    }
    }
    ],
    "type": "basic"
    },
    {
    "conditions": [
    {
    "input_sources": [
    {
    "language": "zh-Hans"
    }
    ],
    "type": "input_source_if"
    }
    ],
    "from": {
    "key_code": "left_shift",
    "modifiers": {
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "left_shift"
    }
    ],
    "to_if_alone": [
    {
    "select_input_source": {
    "language": "en"
    }
    }
    ],
    "type": "basic"
    }
    ]
    "description": "Switch between zh-Hans <-> en (left_shift)",
    "manipulators": [
    {
    "conditions": [
    {
    "input_sources": [
    {
    "language": "en"
    }
    ],
    "type": "input_source_if"
    }
    ],
    "from": {
    "key_code": "left_shift",
    "modifiers": {
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "left_shift"
    }
    ],
    "to_if_alone": [
    {
    "select_input_source": {
    "language": "zh-Hans"
    }
    ```
    }
    ],
    "type": "basic"
    },
    {
    "conditions": [
    {
    "input_sources": [
    {
    "language": "zh-Hans"
    }
    ],
    "type": "input_source_if"
    }
    ],
    "from": {
    "key_code": "left_shift",
    "modifiers": {
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "left_shift"
    }
    ],
    "to_if_alone": [
    {
    "select_input_source": {
    "language": "en"
    }
    }
    ],
    "type": "basic"
    }
    ]
    }
  2. yetone created this gist May 1, 2019.
    73 changes: 73 additions & 0 deletions karabiner.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,73 @@
    ```json
    {
    "description": "Switch between zh-Hans <-> en (left_shift)",
    "manipulators": [
    {
    "conditions": [
    {
    "input_sources": [
    {
    "language": "en"
    }
    ],
    "type": "input_source_if"
    }
    ],
    "from": {
    "key_code": "left_shift",
    "modifiers": {
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "left_shift"
    }
    ],
    "to_if_alone": [
    {
    "select_input_source": {
    "language": "zh-Hans"
    }
    }
    ],
    "type": "basic"
    },
    {
    "conditions": [
    {
    "input_sources": [
    {
    "language": "zh-Hans"
    }
    ],
    "type": "input_source_if"
    }
    ],
    "from": {
    "key_code": "left_shift",
    "modifiers": {
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "left_shift"
    }
    ],
    "to_if_alone": [
    {
    "select_input_source": {
    "language": "en"
    }
    }
    ],
    "type": "basic"
    }
    ]
    }
    ```