open_application

Open an application, or if it’s already running, bring it into focus.

Examples

Open EventViewer by right command + v:

{
    "description": "Open EventViewer by right command + v",
    "manipulators": [
        {
            "type": "basic",
            "from": {
                "key_code": "v",
                "modifiers": {
                    "mandatory": ["right_command"],
                    "optional": ["caps_lock"]
                }
            },
            "to": [
                {
                    "software_function": {
                        "open_application": {
                            "file_path": "/Applications/Karabiner-EventViewer.app"
                        }
                    }
                }
            ]
        }
    ]
}

Focus recently opened applications by right command + 1, right command + 2, right command + 3:

{
    "description": "open_application frontmost_application_history_index by right_command + 1...3",
    "manipulators": [
        {
            "type": "basic",
            "from": {
                "key_code": "1",
                "modifiers": {
                    "mandatory": ["right_command"],
                    "optional": ["caps_lock"]
                }
            },
            "to": [
                {
                    "software_function": {
                        "open_application": {
                            "frontmost_application_history_index": 1
                        }
                    }
                }
            ]
        },
        {
            "type": "basic",
            "from": {
                "key_code": "2",
                "modifiers": {
                    "mandatory": ["right_command"],
                    "optional": ["caps_lock"]
                }
            },
            "to": [
                {
                    "software_function": {
                        "open_application": {
                            "frontmost_application_history_index": 2
                        }
                    }
                }
            ]
        },
        {
            "type": "basic",
            "from": {
                "key_code": "3",
                "modifiers": {
                    "mandatory": ["right_command"],
                    "optional": ["caps_lock"]
                }
            },
            "to": [
                {
                    "software_function": {
                        "open_application": {
                            "frontmost_application_history_index": 3
                        }
                    }
                }
            ]
        }
    ]
}

Specification

{
    "to": [
        {
            "software_function": {
                "open_application": { "bundle_identifier": "com.apple.Safari" }
            }
        }
    ]
}
Priority Name Required Description Available since
1 bundle_identifier Optional The bundle identifier of the application v15.0.19
2 file_path Optional The file path of the application v15.0.19
3 frontmost_application_history_index Optional The index of the frontmost application’s history v15.3.6