MoonshotAI / MoonshotAI/kimi-code
[Feature Request] Configurable keybindings — e.g. remap "insert newline" to Alt+Enter
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 7.5k
- Forks
- 1.2k
- Avg merge
- 11h 53m
- Merged PRs (30d)
- 350
Description
Problem
In the TUI input box, inserting a newline is only possible via Shift-Enter or Ctrl-J. Many users have muscle memory for Alt+Enter from other tools (chat apps, editors, other CLIs). Currently there is no way to remap keys: neither config.toml nor tui.toml exposes keybinding settings, and the keyboard-shortcuts docs list fixed shortcuts only.
Proposed solution
Support user-configurable keybindings for TUI input actions — at minimum for "insert newline" — e.g. a [keybindings] table in tui.toml or a dedicated keybindings.toml. Alt+Enter should be bindable as an alternative newline key.
Alternatives considered
Terminal-level remapping (kitty / WezTerm can translate Alt+Enter into the Shift-Enter escape sequence), but it is terminal-specific and not portable.
Additional context
Related: #256 — newline key handling is already a pain point on some platforms; configurable bindings would give users a fallback when the default doesn't work in their terminal.
Environment: kimi 0.26.0, Linux
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 input box key handling and the existing config.toml or tui.toml parsing, then review the keyboard-shortcuts documentation. Done means users can configure TUI input actions, including binding Alt+Enter as an alternative for inserting a newline, with the supported configuration documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100