MoonshotAI / MoonshotAI/kimi-code

[Feature request] Mouse reporting in TUI: click-to-position caret in the input box

Open
#2,809 0 comments 0 reactions 0 assignees View on GitHub

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):

  1. The TUI enables mouse reporting (DECSET ?1000/?1006)
  2. The terminal forwards clicks as SGR mouse sequences on stdin
  3. 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

  1. Enable mouse reporting in the TUI
  2. Click-to-position caret in the input box
  3. (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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.