InputSourcePro icon indicating copy to clipboard operation
InputSourcePro copied to clipboard

[Bug] 呼出 ChatGPT 悬浮窗后 InputSourcePro 切换失效及修复建议

Open soloIn opened this issue 6 months ago • 2 comments

Describe the bug

在使用过程中发现,当通过全局快捷键呼出 ChatGPT macOS 客户端的悬浮窗(Floating Window)之后,InputSourcePro 会出现失效的情况,无法正常自动切换输入法状态。

Root Cause & Proposed Solution

经过ai排查,这是因为 ChatGPT 的悬浮窗应用没有触发常规的 App 激活通知,导致监听机制失效。 建议的修复方式: 只需要将 ChatGPT 的 Bundle ID (com.openai.chat) 添加到项目中的 floatingAppIdentifier 列表中即可解决。 因为 floatingAppIdentifier 中的应用会采用主动聚焦(focus-based)的方式来监听和触发输入法切换,这种机制完美契合 ChatGPT 悬浮窗(NSPanel / Accessory)的焦点转移行为。

To Reproduce

正常运行 InputSourcePro。 使用全局快捷键呼出 ChatGPT macOS 客户端(悬浮窗模式)。 观察 InputSourcePro,此时焦点切换时的输入法自动切换功能失效。

ADD

由于不太熟悉提交 PR ,因此开此 Issue 说明,是否ui提供添加floatingAppIdentifier?。感谢作者!

soloIn avatar May 17 '26 05:05 soloIn

Have you verified if adding com.openai.chat to the floatingAppIdentifier list in InputSourcePro allows the app to properly receive activation notifications and resolve the input source switching issue?

After some simple testing, it seems to have been resolved. However, it has introduced other minor issues, such as the "floating window" not displaying input method prompts.

soloIn avatar Jun 11 '26 02:06 soloIn