Open
Conversation
- settings.jsx:新增「快捷键设置」区块,支持录制新快捷键 - 打开设置时自动加载当前已保存的热键 - 点击「录制新快捷键」进入监听模式,按下组合键实时预览 - 保存时注销旧热键、注册新热键,持久化到 settings 存储 - 注册失败时自动恢复旧热键并提示冲突原因 - App.jsx:启动时从持久化设置读取热键,不再写死默认值 - SettingsPanel.jsx:同步添加快捷键设置区块(主窗口弹窗) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.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.
背景
目前应用的全局快捷键(默认
⌘+Shift+Space)硬编码在源码中,用户无法在界面上修改,相关 Issue 也提到 F2 与系统重命名键冲突。本 PR 在设置页面新增快捷键配置功能。改动内容
src/settings.jsx(设置独立窗口)⌘ + ⇧ + 空格)src/App.jsxsettings读取持久化的热键(getSetting('hotkey', ...)),不再写死默认值SettingsPanel传入onHotkeyChange回调,保存后同步生效无需重启src/components/SettingsPanel.jsx(主窗口内嵌弹窗)效果预览
测试