github / github/copilot-cli

Feature Request: Support Shift+Arrow and Ctrl+A text selection in prompt input

Đang mở
#2,644 3 bình luận 2 reaction 0 người được giao Xem trên GitHub
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

Currently, the input line in Copilot CLI does not support standard GUI-style text selection shortcuts:

- **Shift+Arrow keys** (e.g. Shift+Left, Shift+Right, Shift+Home, Shift+End) do not select text — they are either ignored or move the cursor without selection
- **Ctrl+A** moves the cursor to the beginning of the line (readline behavior) instead of selecting all input text

This makes it impossible to select a portion (or all) of the input in order to copy, cut, or replace it using familiar keyboard-driven workflows. In contrast, mouse selection + Ctrl+Shift+C does work via Windows Terminal, but keyboard-only text selection is not available.

> **Note:** This is distinct from existing issues about readline cursor navigation (e.g. #1069) — the request here is specifically for **visual text selection** support in the prompt input, similar to how text editors and modern terminal input fields behave.

### Proposed solution

Support shift-based text selection in the prompt input field:

- Shift+Left / Shift+Right — extend selection by character
- Shift+Home / Shift+Ctrl+Left — extend selection to beginning
- Shift+End / Shift+Ctrl+Right — extend selection to end
- Ctrl+A — select all input text (with a visual highlight), rather than just moving the cursor

Selected text should be copyable via the platform copy shortcut and replaceable by typing.

### Example prompts or workflows

1. Typed a long prompt and want to replace a specific phrase → Shift+click or Shift+arrow to select it, then type the replacement
2. Want to copy the entire current input to reuse it → Ctrl+A then Ctrl+C
3. Want to select from cursor to end of line to cut it → Shift+End, then Ctrl+X

### Additional context

- **OS:** Windows
- **Terminal:** Windows Terminal
- **Shell:** PowerShell 7
- **Related issue:** #1684 (Cut/Undo shortcuts) — text selection is a prerequisite for useful Cut support

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.