anthropics / anthropics/claude-code

Option to swap Enter and Cmd+Enter in the composer (Enter = newline, Cmd+Enter = send)

Đang mở
#92,774 0 bình luận 1 reaction 0 người được giao Xem trên GitHub
area:tui enhancement keybindings
Ngôn ngữ chính
Python
Star
145k
Fork
23.1k
Chỉ số merge pull request
Chỉ số pull request đang chờ

Mô tả

### Feature request

Let me swap the two composer keys: make plain **Enter** do what **Cmd/Ctrl+Enter** does today, and make **Cmd/Ctrl+Enter** send the message.

**Current behavior**

- `Enter` — sends the prompt to the session immediately.
- `Cmd/Ctrl+Enter` — inserts a newline / continues editing.

**Requested behavior (as an option)**

- `Enter` — newline, keep editing.
- `Cmd/Ctrl+Enter` — send.

**Why**

Long prompts are the normal case, not the exception: multi-line instructions, pasted logs, file paths, numbered requirements. With `Enter` bound to send, every half-written prompt gets fired off by muscle memory, and the only way to recover is to interrupt the agent and retype. Swapping it makes the destructive action (send) the deliberate one and the frequent action (newline) the cheap one. This is the convention in Slack's "Cmd+Enter to send" mode, many IDE chat panes, and several other agent UIs.

**Shape of the ask**

- A setting, not a hard change — some people prefer `Enter` to send.
- Something like `"composerSubmitKey": "enter" | "mod+enter"` in settings.json, plus a toggle in `/config`.
- Applies to both the CLI composer and the desktop app Code tab, so muscle memory carries across.
- The hint text under the input should reflect the active binding.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

Start by tracing the CLI composer and desktop app Code tab, then inspect the settings.json and /config entry points named in the request. Verify the selected binding in both surfaces and that the input hint reflects it; completion should preserve the existing default while supporting both requested modes.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Lĩnh vực
cli, desktop
Loại issue
Tính năng
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Sôi nổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
48/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.