mirror of
https://github.com/MoonshotAI/kimi-code.git
synced 2026-07-09 17:29:12 +00:00
feat(tui): open undo selector on double-Esc (#1220)
* feat(tui): open undo selector on double-Esc Pressing Esc twice while idle now opens the undo selector, equivalent to running /undo with no arguments. Esc during streaming, compaction, or with a popup open keeps its cancel/close behavior and does not arm the double-press. * fix(tui): disarm double-Esc undo on any intervening key A pending double-Esc was only cleared by text changes, so a sequence like Esc, Ctrl-C, Esc within the window still opened the undo selector. Fire an onNonEscapeInput hook for every non-Escape key and clear the pending state there, so the shortcut only triggers for two consecutive Escape presses.
This commit is contained in:
parent
80e6888e34
commit
ec51324230
9 changed files with 205 additions and 0 deletions
|
|
@ -39,6 +39,7 @@ Type `!` in an empty input box to enter shell mode and run terminal commands dir
|
|||
| `Ctrl-V` | Paste an image or video from the clipboard (Unix / macOS) |
|
||||
| `Alt-V` | Paste an image or video from the clipboard (Windows) |
|
||||
| `Ctrl--` | Undo |
|
||||
| `Esc` `Esc` | Open the undo selector (double-press while idle) |
|
||||
|
||||
Pressing `Ctrl-G` opens an external editor, selected according to the following priority:
|
||||
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ Kimi Code CLI 的 TUI 交互模式支持一套键盘快捷键。键位按使用
|
|||
| `Ctrl-V` | 粘贴剪贴板中的图片或视频(Unix / macOS) |
|
||||
| `Alt-V` | 粘贴剪贴板中的图片或视频(Windows) |
|
||||
| `Ctrl--` | 撤销(Undo) |
|
||||
| `Esc` `Esc` | 双击打开撤销选择框(空闲状态下) |
|
||||
|
||||
按 `Ctrl-G` 会打开外部编辑器,编辑器按以下优先级选择:
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue