-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Describe the feature or problem you'd like to solve
The input bar lacks standard text editing shortcuts that users expect from any modern terminal or text editor. There is no way to select all input text, kill an entire line, or clear the whole prompt in one keystroke. Users writing long or complex prompts have to manually hold Backspace or repeatedly use Ctrl+W (delete word) — a slow and frustrating experience.
Proposed solution
Add the following standard editing shortcuts to the input bar, consistent with readline/shell conventions:
| Shortcut | Action |
|---|---|
Ctrl+A |
Move cursor to beginning of line (readline standard) |
Ctrl+E |
Move cursor to end of line (readline standard) |
Ctrl+U |
Delete from cursor to beginning of line (kill-line backward) |
Ctrl+K |
Delete from cursor to end of line (kill-line forward) |
Ctrl+Shift+U |
Clear the entire multi-line prompt at once |
These are standard readline/Emacs keybindings already familiar to terminal users. At minimum, Ctrl+U (kill to start of line) and a full-clear shortcut (Ctrl+Shift+U) are the most critical missing pieces.
Note on conflicts: Some of these bindings may overlap with existing terminal or OS shortcuts depending on the environment (e.g.
Ctrl+Kin some terminals). The implementation should check for conflicts and skip or allow user remapping where needed.Alt+Backspaceis intentionally excluded here as it was fixed in 0.0.417 to correctly act as a word-delete shortcut and should remain so.
Example prompts or workflows
- User types a long multi-line prompt, realises it's wrong, hits
Ctrl+Shift+U— entire input cleared instantly, ready to retype. - User is mid-line, cursor in the middle —
Ctrl+Uclears back to the start of the current line,Ctrl+Kclears forward to the end. - User navigates to beginning/end of line with
Ctrl+A/Ctrl+Ewithout reaching for the Home/End keys. - Experienced shell users get the muscle-memory readline behaviour they already know from
bash/zsh.
Additional context
- OS: Windows 11 Pro (Build 26200 / 24H2)
- Shell: PowerShell 7.5.4
- Copilot CLI: 0.0.420 (win32-x64)
Ctrl+W(delete word backward) andAlt+Backspace(delete word, fixed in 0.0.417) already work — these shortcuts complete the standard readline editing set.Ctrl+G(open in external editor, added in 0.0.419) already exists — these shortcuts are the complement for users who prefer to stay in-line.