MoonshotAI / MoonshotAI/kimi-code
[Feature request] Mouse reporting in TUI: click-to-position caret in the input box
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 7.5k
- Forks
- 1.2k
- Avg merge
- 11h 53m
- Merged PRs (30d)
- 350
Description
Summary
Enable mouse reporting (DECSET ?1000/?1006 SGR mouse mode) in the TUI and map clicks inside the input box to caret movement — click anywhere in the text, the caret jumps there.
Motivation
The input box is keyboard-only today: moving the caret requires arrow keys, which is painful when editing long multi-line input (especially CJK text). For non-programmer users, click-to-position is a baseline interaction.
Reference implementation
Claude Code 2.x ships this as its "native cursor" (internal flag tengu_native_cursor, server-gated via GrowthBook):
- The TUI enables mouse reporting (DECSET ?1000/?1006)
- The terminal forwards clicks as SGR mouse sequences on stdin
- The TUI maps the clicked row/column to an input-box cell and moves the caret
Any modern terminal (iTerm2, Ghostty, WezTerm, kitty) forwards these sequences by default — no terminal-side configuration required.
Current state
Kimi Code 0.34.0 does not read mouse events; the Interaction and Keyboard Shortcuts documentation pages list no mouse support.
Request
- Enable mouse reporting in the TUI
- Click-to-position caret in the input box
- (Nice to have) mouse-wheel scrolling in the conversation view
Environment
kimi-code 0.34.0, macOS (Apple Silicon), iTerm2 3.6.11
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the TUI's stdin handling and input-box rendering or caret-mapping entry points. Verify how DECSET ?1000/?1006 SGR mouse sequences are received, then implement click-to-position behavior and confirm that clicks map correctly across multi-line and CJK input; mouse-wheel scrolling is an optional extension.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100