You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Prompt textarea does not support Shift+Arrow text selection #12882
In the prompt input textarea, I cannot select text using keyboard selection shortcuts (Shift + Arrow keys). Cursor movement works, but selection range is not created/highlighted, which makes editing long prompts difficult.
I'd like to see standard keyboard text selection working in the prompt textarea (Shift+Arrow to extend selection), similar to common terminal editors/input widgets.
Additional information
This may be a missing feature rather than a regression, but it significantly impacts usability for long prompts.
Reacted by Nurgo, Ignat Remizov, Kendon Bell, Dron007, Joseph Barbier, kellen-vm, gedalez and carlosporta
This issue feels like it should probably be interpreted as the broader baseline selection/editing parity gap in the composer, not only plain Shift+Arrow.
The concrete set that feels missing:
Shift+Left/Right to extend/shrink selection by character
word-jump selection (Ctrl+Shift+Left/Right on Win/Linux, platform-appropriate equivalent on macOS)
Ctrl+X / cut on the selected range
Once selection exists, word-wise selection really wants to share the same boundary logic as cursor word navigation, so this also seems related to #12339.
And at the broader control-surface level, this is another reason #3049 matters: these baseline editing keys should not stay hardcoded forever if Codex wants serious TUI/editor parity.
I implemented the first scoped slice for this on my fork and pushed it to branch composer-shift-selection.
Current scope:
Shift+Left / Shift+Right selection in the composer textarea
Shift+Up / Shift+Down selection across visual lines
Shift+Home / Shift+End selection to line boundaries
Backspace / Delete remove the active selection
typing replaces the active selection
focused textarea tests and composer docs updated for the new behavior
I kept this intentionally limited to keyboard selection/editing in the prompt textarea and did not bundle mouse-selection or transcript-wide copy behavior into the same change.
If that scope aligns with maintainer intent, I can open a PR from the branch.
I can reproduce the same class of issue with keyboard selection in the Codex CLI composer.
Environment:
Codex CLI 0.128.0
Windows
Reproducible in a regular PowerShell terminal session
Reproduction:
Start Codex CLI.
Type a multi-line prompt in the composer.
Place the caret in the middle or at the end of a line.
Press Shift+Home, Shift+End, or Shift+Arrow.
Expected:
The editable range inside the composer should become selected.
Then:
typing should replace the active selection;
Backspace/Delete should remove the active selection;
line-oriented selection should work consistently with character/word-oriented selection.
Actual:
The caret moves or no selection-like behavior happens, but no editable selection range is created/highlighted inside the prompt textarea.
Important distinction:
This is not terminal screen/scrollback selection for copying rendered output. I agree that terminal screen selection is normally handled by the terminal emulator.
This request is about editor selection inside the Codex composer input buffer before submitting the prompt.
That behavior requires application/editor state: a selection anchor/range, selection-aware movement actions, rendering of the selected range, and insert/delete behavior that operates on the active selection.
Adding Windows user feedback and a proposed implementation approach.
Environment: Windows, Codex CLI 0.167.0 (version checked locally). The user reports that Alt+Shift+Arrow does not select text in the editable prompt. Ctrl+Shift+Left/Right is the usual Windows word-selection shortcut; Alt+Shift+Left/Right could be an optional configurable alternative.
Selecting and replacing prompt text should be possible entirely from the keyboard inside the CLI. Mouse selection and editing in a separate application do not meet that requirement.
Proposed fix (design suggestion, not an implemented or tested patch):
Generalize/reuse the existing selection range and editing behavior so keyboard input can establish an anchor and extend or shrink the selection.
Add Shift+Arrow and Shift+Home/End selection, plus Ctrl+Shift+Left/Right word selection on Windows. Reuse existing word-boundary and visual-line navigation logic.
Expose selection actions through the editor keymap, allowing Alt+Shift+Left/Right as an optional binding.
Ensure typing/paste replaces the selected range and Backspace/Delete removes it; define consistent selection collapse behavior for unmodified movement.
Add focused tests for reversed selections, wrapped lines, Unicode graphemes, atomic placeholder elements, replacement/deletion, and Windows modifier delivery.
A terminal-only remap cannot supply missing composer selection semantics. The application needs to handle these actions directly. This builds on earlier proposals in this thread while accounting for the mouse-selection infrastructure now present in 0.167.0.
Activity
oxysoft commentedon Mar 11, 2026
This issue feels like it should probably be interpreted as the broader baseline selection/editing parity gap in the composer, not only plain
Shift+Arrow.The concrete set that feels missing:
Shift+Left/Rightto extend/shrink selection by characterCtrl+Shift+Left/Righton Win/Linux, platform-appropriate equivalent on macOS)Ctrl+X/ cut on the selected rangeOnce selection exists, word-wise selection really wants to share the same boundary logic as cursor word navigation, so this also seems related to #12339.
And at the broader control-surface level, this is another reason #3049 matters: these baseline editing keys should not stay hardcoded forever if Codex wants serious TUI/editor parity.
Gireeshbd commentedon Apr 2, 2026
I inspected the current TUI composer implementation and this looks like missing functionality rather than a one-off regression.
Current state on
main:TextAreatrackstext,cursor_pos, placeholder elements, wrap state, and a single-entry kill buffer, but no selection anchor/range.Shift+Arrow.Backspace/Delete/ typed input to operate on a highlighted range.A minimal first patch that seems tractable and reviewable would be:
TextAreaShift+Left/Right/Up/DownandShift+Home/EndBackspace/Deleteremove the active selection when presentI’m intentionally not bundling mouse selection or transcript-wide copy behavior into this, since those look like separate design problems.
If this scope aligns with maintainer intent, I can prepare a patch on that basis.
Gireeshbd commentedon Apr 2, 2026
I implemented the first scoped slice for this on my fork and pushed it to branch
composer-shift-selection.Current scope:
Shift+Left/Shift+Rightselection in the composer textareaShift+Up/Shift+Downselection across visual linesShift+Home/Shift+Endselection to line boundariesBackspace/Deleteremove the active selectionI kept this intentionally limited to keyboard selection/editing in the prompt textarea and did not bundle mouse-selection or transcript-wide copy behavior into the same change.
If that scope aligns with maintainer intent, I can open a PR from the branch.
Dron007 commentedon Apr 14, 2026
Additionally in any text input in Windows I often use combinations like
Shift+Left/Rightto select textCtrl+Shift+Left/Rightto select text quickly by wordCtrl+Backspaceto delete word to the left of the caret. CurrentlyAlt+Backspaceworks instead which if frustrating.Ctrl+Delto delete word to the right of the caret. Also,Alt+Delworks instead.There is actually no way to select and quickly edit text using keyboard (tested only in Windows).
2014Alexander commentedon May 2, 2026
I can reproduce the same class of issue with keyboard selection in the Codex CLI composer.
Environment:
0.128.0Reproduction:
Shift+Home,Shift+End, orShift+Arrow.Expected:
The editable range inside the composer should become selected.
Then:
Actual:
The caret moves or no selection-like behavior happens, but no editable selection range is created/highlighted inside the prompt textarea.
Important distinction:
This is not terminal screen/scrollback selection for copying rendered output. I agree that terminal screen selection is normally handled by the terminal emulator.
This request is about editor selection inside the Codex composer input buffer before submitting the prompt.
That behavior requires application/editor state: a selection anchor/range, selection-aware movement actions, rendering of the selected range, and insert/delete behavior that operates on the active selection.
Related issue: #20645
kellen-vm commentedon Jul 8, 2026
Bumping this.
This feels like pretty important functionality despite how many upvotes this issue gets, unless someone has figured out an elegant workaround...
oderebek commentedon Nov 14, 2026
Adding Windows user feedback and a proposed implementation approach.
Environment: Windows, Codex CLI 0.167.0 (version checked locally). The user reports that Alt+Shift+Arrow does not select text in the editable prompt. Ctrl+Shift+Left/Right is the usual Windows word-selection shortcut; Alt+Shift+Left/Right could be an optional configurable alternative.
Selecting and replacing prompt text should be possible entirely from the keyboard inside the CLI. Mouse selection and editing in a separate application do not meet that requirement.
Source inspection:
Proposed fix (design suggestion, not an implemented or tested patch):
A terminal-only remap cannot supply missing composer selection semantics. The application needs to handle these actions directly. This builds on earlier proposals in this thread while accounting for the mouse-selection infrastructure now present in 0.167.0.
issue-proofs: 5 port tests for upstream TUI issues (openai#12882, ope…