Claude DesktopのOption+Space(クイックエントリー)を使用する際、日本語IMEの変換確定のEnterキーで誤ってメッセージが送信されてしまう問題を解決するKarabiner-Elementsの設定です。
{
"title": "Claude Desktop IME Fix for Japanese Input",
"rules": [
{
"description": "Claude Desktop: Solo Enter → Shift+Enter (改行), Cmd+Enter → Enter (送信)",
"manipulators": [
{
"type": "basic",
"conditions": [],
"from": {
"key_code": "spacebar",
"modifiers": {
"mandatory": ["option"]
}
},
"to": [
{
"shell_command": "open -g -b com.anthropic.claudefordesktop"
},
{
"key_code": "spacebar",
"modifiers": ["option"]
}
]
},
{
"type": "basic",
"from": {
"key_code": "return_or_enter",
"modifiers": {
"mandatory": ["command"]
}
},
"to": [
{
"key_code": "return_or_enter"
}
],
"conditions": [
{
"type": "frontmost_application_if",
"bundle_identifiers": [
"^com\\.anthropic\\.claudefordesktop$"
]
}
]
},
{
"type": "basic",
"from": {
"key_code": "return_or_enter"
},
"to": [
{
"key_code": "return_or_enter",
"modifiers": ["shift"]
}
],
"conditions": [
{
"type": "frontmost_application_if",
"bundle_identifiers": [
"^com\\.anthropic\\.claudefordesktop$"
]
}
]
}
]
}
]
}
Claude DesktopのクイックエントリーウィンドウをOption+Spaceで起動して使用する際、日本語IMEで変換を確定するためのEnterキーが、そのままメッセージ送信として扱われてしまいます。
この設定により、Claude Desktop内でのキーマッピングを以下のように変更します:
- Enter単独 → Shift+Enter(改行のみ)
- Cmd+Enter → Enter(メッセージ送信)
- 上記のKarabiner-Elements設定をコピー
- Karabiner-Elementsを開く
- "Complex Modifications"タブを選択
- "Add rule"ボタンをクリック
- "Add your own rule"ボタンをクリック
- 表示されたダイアログにJSONをペースト
- "Save"ボタンをクリック
設定を有効にすると、Claude Desktop内で:
- 日本語入力の変換確定は通常通りEnterキーで行えます
- メッセージを送信するにはCmd+Enterを使用します
- 改行のみを入力したい場合は、そのままEnterキーを押します(Shift+Enterとして扱われます)
- Option+Spaceを押すと、まず
open -g -b
でClaude Desktopをバックグラウンドで起動/フォーカス - その後、本来のOption+Spaceをパススルーしてクイックエントリーを開く
bundle_identifiers
に正規表現パターン^com\\.anthropic\\.claudefordesktop$
を使用- 3つのmanipulatorsで構成:
- Option+SpaceでClaude Desktopにフォーカスを当ててからクイックエントリーを開く
- Cmd+Enterを通常のEnterに変換(送信用)
- 単独のEnterをShift+Enterに変換(改行用)
- Karabiner-Elements 12.3.0以降
- Claude Desktop for macOS
- macOS 11.0以降
Public Domain