claude-code - 💡(How to fix) Fix Feature request: Add cursorLineStart/cursorLineEnd actions for Chat input

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

When the chat input has a single line and the cursor is in the middle, pressing up/down currently triggers history:previous/history:next. There is no way to rebind them to jump to line start/end because no cursor-positioning actions exist in the keybinding system.

Root Cause

When the chat input has a single line and the cursor is in the middle, pressing up/down currently triggers history:previous/history:next. There is no way to rebind them to jump to line start/end because no cursor-positioning actions exist in the keybinding system.

Fix Action

Fix / Workaround

  • Codex CLI already implements this behavior: in a single-line input, up jumps to line start and down jumps to line end. Claude Code users familiar with Codex expect the same.
  • cmd+← / cmd+→ currently work as a workaround on macOS, but up/down is more ergonomic for single-line navigation and the keys are otherwise unused (no multi-line to traverse).
  • Unbinding up/down via null just makes them inert — they don't fall through to OS-level cursor movement because the TUI framework consumes the event.

Current workaround

Code Example

{
  "context": "Chat",
  "bindings": {
    "up": "chat:cursorLineStart",
    "down": "chat:cursorLineEnd"
  }
}
RAW_BUFFERClick to expand / collapse

Summary

When the chat input has a single line and the cursor is in the middle, pressing up/down currently triggers history:previous/history:next. There is no way to rebind them to jump to line start/end because no cursor-positioning actions exist in the keybinding system.

Requested Change

Add chat:cursorLineStart and chat:cursorLineEnd (or equivalent) to the available actions so users can bind them. For example:

{
  "context": "Chat",
  "bindings": {
    "up": "chat:cursorLineStart",
    "down": "chat:cursorLineEnd"
  }
}

Motivation

  • Codex CLI already implements this behavior: in a single-line input, up jumps to line start and down jumps to line end. Claude Code users familiar with Codex expect the same.
  • cmd+← / cmd+→ currently work as a workaround on macOS, but up/down is more ergonomic for single-line navigation and the keys are otherwise unused (no multi-line to traverse).
  • Unbinding up/down via null just makes them inert — they don't fall through to OS-level cursor movement because the TUI framework consumes the event.

Current workaround

cmd+← / cmd+→ on macOS.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix Feature request: Add cursorLineStart/cursorLineEnd actions for Chat input