to.select_input_source

select_input_source change the current input source.

{
    "to": [
        {
            "select_input_source": {
                "language": "language regex",
                "input_source_id": "input source id regex",
                "input_mode_id": "input mode id regex"
            }
        }
    ]
}
Name Required Description
language Optional The language regex such as "^en$", "^fr$"
input_source_id Optional The input source id regex such as "^com\\.apple\\.keylayout\\.US$"
input_mode_id Optional The input mode id regex such as "^com\\.apple\\.inputmethod\\.Japanese\\.Hiragana$"

Example

Switch to French input source.

{
    "to": [
        {
            "select_input_source": {
                "language": "^fr$"
            }
        }
    ]
}

Investigate the input source identifiers

You can find the current input source identifiers by EventViewer > Variables tab.

{
    "input_source": {
        "input_mode_id": "com.apple.inputmethod.Japanese",
        "input_source_id": "com.google.inputmethod.Japanese.base",
        "language": "ja"
    }
}
eventviewer-input-source-identifiers@2x.png