github / github/copilot-cli

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

Ouverte
#2,644 3 commentaires 2 réactions 0 personnes assignées Voir sur GitHub
area:input-keyboard
Langage dominant
Shell
Étoiles
11.2k
Forks
1.9k
Merge moyen
14 h 16 min
PR mergées (30 j)
6

Description

### 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

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.