Repository navigation
feat(shell): 功能键编码 (#30) - #239
Merged
Merged
Conversation
F1-F4 use the SS3 letters, F5-F12 use the xterm tilde numbers, and a modified F1 keeps the CSI modifier form; keyboard_test pins all twelve.
This was referenced Oct 30, 2026
Merged
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.
内容
补键盘映射里缺失的功能键(#30 计划中的一项):
ESC O P/Q/R/SESC [ 15~ / 17~ / 18~ / 19~ / 20~ / 21~ / 23~ / 24~(xterm 表,不是物理顺序)带修饰键的 F1–F4 用
CSI 1;<mod>P形式;F5 及以后沿用既有的CSI <n>;<mod>~形式。测试
keyboard_test新增:12 个功能键的完整字节断言 +Ctrl+F1→ESC [ 1;5 P。本地:
keyboard normal-mode sequences, modifiers, UTF16 boundaries and focus reset passed,termforge_shell构建通过。边界
modifyFunctionKeys扩展模式(如CSI 1;2P之外的ESC O 1;2P变体);Refs #30