Skip to content

fix(setting): 修复全局快捷键取词时机#508

Merged
lzx8589561 merged 2 commits into
ZToolsCenter:mainfrom
Particaly:fix/global-shortcut-selected-text
May 31, 2026
Merged

fix(setting): 修复全局快捷键取词时机#508
lzx8589561 merged 2 commits into
ZToolsCenter:mainfrom
Particaly:fix/global-shortcut-selected-text

Conversation

@Particaly

Copy link
Copy Markdown
Collaborator

等待全局快捷键按键释放后再执行复制取词,并在快捷键注册期间保持键盘状态监听,避免修饰键残留导致取词异常或卡住。

等待全局快捷键按键释放后再执行复制取词,并在快捷键注册期间保持键盘状态监听,避免修饰键残留导致取词异常或卡住。

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a system to capture selected text context upon global shortcut activation by simulating a copy command and monitoring the clipboard. It adds shortcut cooldowns, key release detection, and a sequence-based clipboard update waiter. Feedback from the review highlights the need for timeouts in asynchronous wait functions to prevent potential hangs, recommends triggering context capture conditionally to avoid side effects on unrelated shortcuts, and suggests removing debug logs.

Comment thread src/main/managers/clipboardManager.ts Outdated
Comment thread src/main/api/renderer/settings.ts Outdated
Comment thread src/main/managers/clipboardManager.ts Outdated
Comment thread src/main/core/doubleTapManager.ts Outdated
按需采集文本上下文,并为键盘/剪贴板等待补充超时,降低无关快捷键副作用和处理链路挂起风险。
@lzx8589561 lzx8589561 merged commit b6d0aab into ZToolsCenter:main May 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants