Skip to content

feat(macOS): 支持三套可切换的快捷键预设 - #946

Merged
1lck merged 6 commits into
previewfrom
codex/keymap-presets
Sep 28, 2026
Merged

1lck merged 6 commits into
previewfrom
codex/keymap-presets

Conversation

@arkleselect

@arkleselect arkleselect commented Sep 28, 2026 •

Copy link
Copy Markdown
Collaborator

改动内容

  • 在 macOS「设置 → 快捷键」增加 macOS、IntelliJ IDEA Classic、Eclipse 三套可直接切换的预设。

  • 按 IntelliJ IDEA Community 开源 keymap 为 Lithe 已有且能对应的命令配置 IDEA Classic 和 Eclipse 快捷键;仅没有上游对应动作的 Lithe 命令沿用 Lithe 默认绑定,不导入 IDEA 的完整命令目录。

  • Eclipse 预设按 $default → Mac OS X 10.5+ → Eclipse (Mac OS X) 解析继承;未声明的动作使用上游父层绑定,显式空动作保持无绑定。修正 Resume 为 F8,并清除 Find、Replace、GotoImplementation 等错误回退的绑定。

  • IDEA Classic 的 Stop Run 修正为 Control-F2;当前 Lithe 将停止运行与停止调试分成两个命令,尚未实现 IDEA 的上下文统一 Stop。

  • 切换预设后立即更新设置列表和当前会话的快捷键监听;切换时取消正在进行的快捷键录制。

  • 分别保存每套预设的用户自定义绑定和当前选中的预设;旧版单套自定义绑定迁入 macOS 预设,避免升级后丢失。

  • 快捷键页的「全部恢复默认」仅清除当前预设的自定义绑定;应用级「恢复默认」清除所有预设的自定义绑定并切回 macOS。

  • 更新快捷键 Agent Note、平台功能矩阵及其生成视图;Windows 实现未改动。

  • macOS CI 的 Rust Core/Swift bridge 作业在全部校验通过后仍因 20 分钟作业上限被取消;将该作业上限调为 30 分钟,为冷编译和报告上传留出时间,不修改预设实现。

验证

  • ./scripts/test-macos.sh --no-parallel:1630 项测试、189 个套件全部通过。

  • ./.agents/skills/write-stable-tests/scripts/test-stability-macos.sh -- --filter 'KeyboardShortcutTests':26 项通过,新增 Eclipse 继承与空绑定、IDEA Classic Stop 的回归断言;最慢单项 10ms。

  • 实际启动独立工作树的 macOS 预览:三套预设都能选择,「运行」「调试」等绑定随之更新;关闭并重新打开设置后,选中预设仍然保留。验证结束已恢复原 macOS 预设并退出预览应用。

  • verify-test-stability.sh、verify-agent-notes.sh、verify-service-boundaries.sh、verify-runtime-bundle-immutability.sh、verify-platform-feature-matrix.sh、verify-platform-feature-matrix-change.sh origin/preview HEAD 均通过。

  • 本次 CI 修复:失败作业日志显示 verify-rust-core.sh 已输出全部校验通过,随后在约 20 分钟处收到取消信号;工作流 YAML 解析、测试稳定性静态检查、功能矩阵及变更门禁、git diff --check 均通过。macOS 本机 Bash 3.2 不支持分类器的 Bash 4 小写展开语法,该自测由 GitHub Linux CI 执行;新一轮远程 CI 正在运行。

后续验收

  • 尚未逐一在真实项目中按下三套预设的每个快捷键并确认对应动作执行;完整运行时验收仍需进行。

@ghfind-review ghfind-review Bot added the review: medium ghfind author score; see https://ghfind.com label Sep 28, 2026
@arkleselect
arkleselect marked this pull request as ready for review September 28, 2026 05:44

@xiaoyumuxi xiaoyumuxi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

整体切换/持久化链路看起来是通的,CI 也都过了。不过这里有两处 preset 数据正确性问题,建议合并前修一下。

Comment thread macos/Sources/Lithe/Models/Keymap/LitheCommandCatalog.swift Outdated
Comment thread macos/Sources/Lithe/Models/Keymap/LitheCommandCatalog.swift Outdated
@1lck
1lck merged commit c69a98d into preview Sep 28, 2026
20 checks passed
1lck added a commit that referenced this pull request Sep 28, 2026
* fix(macos): align workspace titlebar and project identity styling

* feat(macOS): 支持三套可切换的快捷键预设 (#946)

* feat(macos): add selectable keymap presets

* fix(macOS): resolve Eclipse keymap inheritance and Classic Stop binding

* fix(ci): allow Rust Core bridge job to finish on macOS

---------

Co-authored-by: Xiaoyumuxi <3075514079@qq.com>

* 优化 macOS 欢迎页样式与窗口尺寸,对齐 IDEA 社区版 (#949)

* style(macos): 对齐欢迎页与 IDEA 社区版样式

* fix(macOS): restore welcome update and stable rollback actions

---------

Co-authored-by: Lichenkang <2188718831@qq.com>

---------

Co-authored-by: Lichenkang <2188718831@qq.com>
Co-authored-by: Xiaoyumuxi <3075514079@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review: medium ghfind author score; see https://ghfind.com

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants