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

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

MacのターミナルとiTermとHyperでShift Enterを押すと改行コードになります

{
    "description": "【Claude Code】Shift+EnterをCtrl+Jに変換",
    "manipulators": [
        {
            "conditions": [
                {
                    "bundle_identifiers": [
                        "com.apple.Terminal",
                        "com.googlecode.iterm2",
                        "co.zeit.hyper"
                    ],
                    "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": "j",
                    "modifiers": ["left_control"]
                }
            ],
            "type": "basic"
        },
        {
            "conditions": [
                {
                    "bundle_identifiers": [
                        "com.apple.Terminal",
                        "com.googlecode.iterm2",
                        "co.zeit.hyper"
                    ],
                    "type": "frontmost_application_if"
                },
                {
                    "input_sources": [
                        {
                            "language": "^en$"
                        }
                    ],
                    "type": "input_source_if"
                }
            ],
            "from": {
                "key_code": "return_or_enter",
                "modifiers": {
                    "mandatory": ["shift"]
                }
            },
            "to": [
                {
                    "key_code": "j",
                    "modifiers": ["left_control"]
                }
            ],
            "type": "basic"
        }
    ]
}
No.2713
11/18 09:47

edit