fix(tui): 命令面板换绑 Ctrl+P(Ctrl+Esc 在 Windows 被开始菜单抢占且三条送达路径全断) - #41
Closed
yq04 wants to merge 1 commit into
Closed
Conversation
…码/kitty 27;5u 未映射) - app.ts 全局快捷键新增 ctrl_p:开关命令面板(已开则关,其他 overlay 开着则切换),复用 activateOverlay 统一入口(live.clear 防叠影 + resetNav + Esc 即时派发) - input-line.ts 移除 ctrl_p→historyPrev(Ctrl+P 让位);ctrl_n 保留 readline 对偶;多行翻历史经 Ctrl+R 兜底 - 原 escape+ctrl 分支保留(当前解析器不可达,留给未来 kitty 增强键盘映射) - 键位文档同步:slash-commands /help、welcome 首屏 tips、README 双语 - 新增 palette-hotkey.test.ts 6 条契约(真实 stdin 字节注入,0x10 走完整解析链);更新 engine-input-line 多行 ctrl_p 旧契约为新契约
Owner
|
已回合 dev 主线(cherry-pick 保留作者署名): 验证:typecheck 通过;新增 palette-hotkey 6 条契约全绿;TUI 域 2213 测试 0 失败;与后续 slash 提示分层(#45)的组合也已联合验证(footer 引用 ctrl+p 一致)。 内容将随下次 sync 进入公开仓 main。Ctrl+Esc 三条送达路径的排查(Windows 宿主抢占 / 0x1B 同码 / kitty 27;5u 未映射)很到位。 |
huiliyi37
added a commit
that referenced
this pull request
Aug 17, 2026
排队消息语义对齐 / 命令面板 Ctrl+P 换绑 / Ctrl+C 退出确认可取消 / 跨 run 陈旧 todo 清单不复活 / slash 提示核心层分层。均附根因分析与 RED→GREEN 测试基线,随 v3.4.0 发布。 Co-authored-by: yq04 <143403280+yq04@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
命令面板原绑定 Ctrl+Esc,三条送达路径全部断裂,实测在任何终端都不可用:
0x1B),解析层不可区分(input-handler.ts的 lone-ESC 派发恒为ctrl: false)\x1B[27;5u,resolveEscapeSequence未映射该码位 →unknown即
app.ts的escape + ctrl分支在当前解析器下不可达——面板实际上只能通过程序化activateOverlay打开。方案
Ctrl+P(0x10 单控制字符) 作为命令面板开关,所有终端可靠送达:
activateOverlay统一入口:live.clear()防叠影 +resetNav+ overlay 内 Esc 即时派发)历史回溯入口不受影响(Ctrl+P 原为 InputLine 的
historyPrev):↑/↓翻历史(原有行为不变)Ctrl+N下一条(readline 对偶保留)Ctrl+R全屏历史搜索 overlay(多行编辑时方向键只做行间导航的防误触设计不变,翻上一条历史经 Ctrl+R 可达)原
escape + ctrl分支保留不删——当前不可达但无害,若未来解析器补充 kitty\x1B[27;5u映射即可复用。行业对照
ctrl+p为列表move_up别名(keymap.rs)——readline 惯例键位,无命令面板ctrl_p_moves_cursor_up(readline 惯例),无命令面板测试
palette-hotkey.test.ts6 条契约(原始 stdin 字节\x10注入,走完整解析链):打开 / toggle 关闭 / 从其他 overlay 切换 / 不打扰输入框草稿 / InputLine 不再响应 ctrl_p / Ctrl+N 保留engine-input-line.test.ts多行 Ctrl+P 旧契约为新契约approval-key.test.tsWindows 路径判定问题,上游基线同样失败)/help文本、首屏 tips、README 中英文