Claude Codeで「Shift + Enter」で改行コードを入力する。

Karabiner-Elements で、以下のように設定します。

{
    "description": "【Claude Code】Shift+Enterを'バックスラッシュ+enter'に変換",
    "manipulators": [
        {
            "conditions": [
                {
                    "bundle_identifiers": [
                        "com.apple.Terminal"
                    ],
                    "type": "frontmost_application_if"
                },
                {
                    "input_sources": [{ "language": "^ja$" }],
                    "type": "input_source_if"
                }
            ],
            "from": {
                "key_code": "return_or_enter",
                "modifiers": { "mandatory": ["shift"] }
            },
            "to": [
                { "select_input_source": { "language": "^en$" } },
                { "key_code": "backslash" },
                { "key_code": "return_or_enter" },
                {
                    "key_code": "spacebar",
                    "modifiers": ["left_control"]
                }
            ],
            "type": "basic"
        },
        {
            "conditions": [
                {
                    "bundle_identifiers": [
                        "com.apple.Terminal"
                    ],
                    "type": "frontmost_application_if"
                },
                {
                    "input_sources": [{ "language": "^en$" }],
                    "type": "input_source_if"
                }
            ],
            "from": {
                "key_code": "return_or_enter",
                "modifiers": { "mandatory": ["shift"] }
            },
            "to": [
                { "key_code": "backslash" },
                { "key_code": "return_or_enter" }
            ],
            "type": "basic"
        }
    ]
}
No.2713
02/02 12:46

edit