[Feature Request] Modern text input: click-to-position, text selection, and standard editing in the prompt
[Feature Request] Modern text input: click-to-position, text selection, and standard editing in the prompt
The Problem
Claude Code's input field doesn't support basic text editing interactions that exist in virtually every other text input on a modern computer:
- Click to position cursor — not supported, must arrow-key to location
- Click+drag to select text — not supported
- Double-click to select a word — not supported
- Standard cut/copy/paste of selections — not supported
- Click to place cursor after a slash command — not supported
The only way to navigate within your input is arrow keys, one character at a time (or Ctrl+arrow for word jumps). For a tool built in 2025–2026 using Ink (which supports mouse events), this is a significant UX gap.
Why This Matters
Claude Code is no longer a simple CLI — it renders styled markdown, tool-approval dialogs, spinners, progress indicators, and syntax-highlighted code blocks. It's a full TUI application. But the one place users actually interact with it — the text input — has 1970s terminal behavior.
Real-world impact:
- Users running multiple Claude Code instances in tiled tmux sessions (a supported and encouraged workflow) need to quickly type, fix, and send messages across several panes. Arrow-keying through a sentence to fix a typo, multiplied across 4–8 panes, adds up fast.
- Composing multi-line prompts with specific instructions often requires going back to edit earlier lines. Without click-to-position, this is painfully slow.
Ctrl+G(external editor) exists as a workaround, but it breaks flow — context-switching to a separate editor to fix a single character is disproportionate overhead.
Proposed Behavior
The input field should behave like a standard text area:
| Action | Expected behavior |
|---|---|
| Left-click | Move cursor to click position |
| Click + drag | Select text |
| Double-click | Select word |
| Shift + click | Extend selection to click position |
| Ctrl+C / Ctrl+X | Copy / cut selected text |
| Ctrl+V | Paste at cursor |
| Ctrl+A | Select all input text |
| Ctrl+Z | Undo |
Slash commands (/permissions, /help, etc.) should continue to work normally within this input model — they're just text until submitted.
Technical Context
- Claude Code uses Ink (React for CLI), which already supports mouse event handling via
useInputand stdin mouse reporting - Terminal mouse tracking (SGR 1006 / xterm) is widely supported across modern terminals (WezTerm, iTerm2, Kitty, Windows Terminal, gnome-terminal, tmux)
- The infrastructure for mouse events is already partially in place — tmux pane selection works, and Ink components elsewhere in Claude Code respond to terminal events
Environment
- Claude Code v2.1.50
- Linux (Pop!_OS / Ubuntu)
- Terminals tested: gnome-terminal, tmux 3.2a
Related Issues
- #5203 — Text input problems (click-to-move non-functional)
- #23018 — Cannot select/copy text from messages
- #22315 — Ctrl+B cursor movement breaks after Ctrl+R / Ctrl+G
- #24563 — Ctrl+G external editor input issues
20 Comments
Also want to add Ctrl+Shift+Left/Right Arrow for selecting whole words.
+1, this used to work few versions before, now the shorcuts for moving across words are switched, they work normally in iTerm but reversed inside CC
+1
+1
+1
+1 from a Windows user who just spent hours trying to solve this.
I went down a rabbit hole today trying to find a terminal where standard keyboard shortcuts (Ctrl+A, Ctrl+C/V,
Shift+Arrow) would work with Claude Code's input prompt. Here's what I tested:
overrides them
terminal sees them
commands. The moment you type claude, Warp's input gets bypassed by Claude Code's own Ink-based prompt handler
IDE editor component. Claude Code overrides it.
The irony: the only place these shortcuts work with Claude Code is the VS Code chat panel — because it bypasses the
Ink input entirely and uses a native text editor widget.
The Ink-based input is the bottleneck. No terminal can fix this from the outside. It needs to be fixed inside
Claude Code itself.
This is the single biggest UX gap in an otherwise incredible product. Every other text input on my computer —
browser, editor, notepad, even PowerShell — handles Ctrl+A, Shift+Arrow, and Ctrl+C as select/copy. Claude Code is
the only one that doesn't.
+1 Not sure if this has been covered elsewhere, but this also is affecting me on iOS. I’m simply trying to go to a spot that I typed previously in a long set of code and text description and I can’t go back. I can’t even select all to copy and paste it into text editor and edit it that way, and then re-paste it. I’m basically stuck with backspacing. I have an iPhone 16 Pro Max.
Windows-native keyboard shortcut gap (important complement to this feature request)
+1 on all points above. Additionally, on Windows Terminal + PowerShell, there's a specific muscle-memory gap with keyboard shortcuts:
Windows users expect these shortcuts to work (standard across every Windows app):
| Shortcut | Expected (Windows native) | Current behavior (Claude Code v2.1.92) |
|----------|--------------------------|----------------------------------------|
|
Ctrl+A| Select all text in input | Goes to beginning of line (Unix readline) ||
Ctrl+Backspace| Delete previous word | Nothing / no effect ||
Ctrl+Delete| Delete next word | Nothing / no effect ||
Ctrl+Shift+Left/Right| Select word by word | Nothing / no effect |Workaround: Windows users must learn Unix shortcuts (
Ctrl+U,Ctrl+W,Ctrl+K), but they're non-intuitive when every other app uses Ctrl+A to select-all.Suggested fix: When
process.platform === 'win32', map these additional keybindings alongside existing Unix ones:Ctrl+A→ select all (coexist with Ctrl+U behavior if needed)Ctrl+Backspace→ delete previous word (alias for Ctrl+W)Ctrl+Delete→ delete next word (new, complements Ctrl+K)Ctrl+Shift+Left/Right→ select word by word (extension of selection)Environment:
This would be a natural follow-up to the broader text-input improvements (mouse, click-to-position) mentioned in this issue.
In the Unix world—or virtually any terminal-based application—the standard keyboard shortcuts are:
When using Claude Code inside a terminal, it is preferable to adopt these standard terminal keyboard shortcuts rather than requesting a terminal app to adopt Windows GUI keybindings conventions. Most terminal applications (e.g., IPython, Bash) running on Windows still follow the same Unix conventions. Claude Code can also run as a desktop GUI application, where standard GUI shortcuts apply as expected.
Evidence from binary analysis (v2.1.109)
I did some digging into the compiled binary to understand the current state of mouse support:
1. Mouse protocol infrastructure exists in the binary:
stringsscan of the v2.1.109 Mach-O binary finds\e[?1000h,\e[?1006h(SGR mouse enable sequences)MouseClick,MouseDown,MouseClickDrag,setMousePositionidentifiers — suggesting the TUI framework (likely Ink/React-based) has mouse event scaffolding2. But it's never activated at runtime:
I used
expectto allocate a pty, launched Claude Code, and captured the raw terminal output during TUI initialization. Tested 6 environment combinations:| Scenario | Enable sequences (
h) | Disable sequences (l) ||---|---|---|
| In tmux,
TERM=tmux-256color| 0 | 4 (1000l,1002l,1003l,1006l) || In tmux,
TERM=xterm-256color| 0 | 4 || In tmux,
TERM=xterm-ghostty| 0 | 4 || No tmux,
TERM=tmux-256color| 0 | 4 || No tmux,
TERM=xterm-256color| 0 | 4 || No tmux,
TERM=xterm-ghostty| 0 | 4 |Claude Code actively sends disable sequences (
\e[?1000letc.) on startup to reset terminal mouse state, but never sends the corresponding enable sequences. This is consistent across all TERM values and regardless of whether$TMUXis set.3. tmux-side confirmation:
tmux display-message -p '#{mouse_any_flag}'returns0for the Claude Code pane, confirming no mouse tracking was requested.Environment: macOS 14 / Apple Silicon, Ghostty terminal, tmux 3.x with
mouse on+allow-passthrough on, Claude Code CLI v2.1.109.This suggests the rendering framework already has the plumbing — it just needs to be wired up. Hope this helps prioritize!
+1
Clicking to reposition the cursor within a long prompt -- how can this not be supported yet.
+1 — and a narrower ask within this: please expose a
chat:selectAllaction in the keybindings system (~/.claude/keybindings.json), so users who want Emacs-style bindings can mapC-x h(and similar chords) to select-all in the chat input.The proposed behavior table here lists
Ctrl+Aas the default, which is great. But the keybindings reference doesn't currently include any selection action for theChatcontext — only theScrollcontext hasselection:*actions, and those are for selecting text in scrolled output, not the input field. That means even onceCtrl+Alands, there's no way to rebind it.Concretely, what's needed:
chat:selectAllaction (default:Ctrl+A)chat:copy,chat:cut,chat:paste(currently onlychat:imagePasteexists), so the whole selection/clipboard flow is rebindableThis would let people configure things like:
+1, same pain on Windows 11 + VS Code integrated terminal + PowerShell pwsh.
Concrete reproduction:
pwsh(noclauderunning):Ctrl+Aworks perfectly — PSReadLine.SelectAll highlights the entire prompt line. Standard expected behavior.claudeand focus moves into the Claude TUI input,Ctrl+Ais hardcoded toBeginningOfLine(Ink/readline default), and there's no way to select-all my typed input.I tried adding
"ctrl+a": "chat:selectAll"to~/.claude/keybindings.json— the action doesn't exist in the configurable list (chat:cancel,chat:submit,chat:externalEditor,chat:clearInput, etc.). Confirmed via thekeybindings-helpskill —selectAllis not exposed at the config layer.Ctrl+G(chat:externalEditor) works but, as the original report says, it's disproportionate overhead for what should be a 1-keystroke interaction. The proposed Ctrl+A behavior in the table above is exactly what's needed.+1
+1
Ink repaints the whole frame each update, so SGR mouse coords don't map to a cursor index without your own hit-testing per render.
+1
+1
To the purists that insist that every user must adopt the terminal input model instead of the standard word processing text input model that has been used for 30 years by 99.999% (5 nines here) of the rest of the 8 billion people on the planet, I say why must that be the case?
As Claude (and all other AI and related toolsets) move outside of the traditional "coder" world, a unified configurable option across PSH, bash, CC, and Claude.ai (and all the rest of the AI and tool interfaces), that allows a user to change the style of input modalities would be and elegant and inclusive way to continue to democratize application development.
+1
Adding a verified diagnosis, since the closed duplicates (#25047, #27835, #41166) keep pointing here and going stale.
What I verified on macOS (Ghostty 1.3.2, cmux, and the iTerm2 report in #41166):
On feasibility: Claude Code already consumes mouse events for the autocomplete menu and in fullscreen mode, so the mouse-reporting plumbing exists. The remaining work is mapping SGR click coordinates to a composer text position when option is held. The modifier bit is already part of the SGR encoding. Gating on option preserves plain-click text selection.
Editing long prompts is the slowest part of using the tool today. Word-jump keys help, but click-to-position is the muscle memory every terminal trained us on.