github / github/copilot-cli

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

Abierto
#2,644 3 comentarios 2 reacciones 0 asignados Ver en GitHub
area:input-keyboard
Lenguaje dominante
Shell
Estrellas
11.2k
Forks
1.9k
Merge medio
14 h 16 min
PR fusionados (30 d)
6

Descripción

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

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.