github / github/copilot-cli

Allow users to configure submit key (e.g., Ctrl+Enter) to prevent accidental submission with IME input

Đang mở
#1,972 3 bình luận 48 reaction 0 người được giao Xem trên GitHub
area:configuration area:input-keyboard
Ngôn ngữ chính
Shell
Star
11.2k
Fork
1.9k
Merge trung bình
14 giờ 16 phút
Pull request đã merge (30 ngày)
6

Mô tả

### Describe the feature or problem you'd like to solve

Accidental prompt submission when using IME (Input Method Editor) for CJK languages, because the Enter key is used both for IME conversion confirmation and prompt submission.

### Proposed solution

When using languages that require an IME — such as Japanese, Chinese, and Korean — the Enter key serves double duty: it confirms character conversion in the IME **and** submits the prompt in Copilot CLI. This leads to frequent accidental submissions and wasted tokens.

Allow users to configure which key submits the prompt and which key inserts a newline. For example:

| Setting | Submit | Newline |
|---------|--------|---------|
| Default (current) | Enter | Shift+Enter / Ctrl+Enter |
| IME-friendly | Ctrl+Enter | Enter |

This could be a configuration option (e.g., in `~/.config/github-copilot/config.json`) or a `/settings` toggle in the TUI.

The key point is that users should be able to **swap** the roles of Enter and Ctrl+Enter (or Shift+Enter), not just add alternative newline keys.

### Example prompts or workflows

1. A Japanese user types: "このファイルをリファクタリングして". They press Enter to confirm the IME conversion of "して" → the incomplete prompt is accidentally submitted.
2. A user sets submit key to Ctrl+Enter in config → Enter now inserts a newline, Ctrl+Enter submits — matching muscle memory from Slack/Discord.
3. A Korean user composing Hangul hits Enter to finalize syllable blocks → with configurable submit key, they avoid wasting tokens on partial prompts.

### Additional context

- Related: #786 (`--confirm-send` flag) — addresses accidental submission via double-Enter confirmation. This proposal is complementary.
- Related: #1481, #1437, #660, #1871 — existing issues around Enter/Shift+Enter/Ctrl+Enter behavior, all of which assume Enter=submit is fixed.
- This is a common feature in chat applications (Slack, Discord, Telegram all offer this toggle).
- IME-based input affects a large user base: Japanese, Chinese, Korean, and other CJK language users.

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

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

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.