leaves615 / KeyboardHolder

https://keyboardholder.leavesc.com/
1.15k stars 33 forks source link

鼠须管0.18之后版本快捷键切换输入法会失效 #164

Closed buildaworld closed 4 months ago

buildaworld commented 4 months ago

自动切换正常 第二次通过快捷键切换回 ABC 输入法后再切换回鼠须管,就会出现图中的状态 切换失败时鼠须管的日志中无任何反应,不知道和keyboardholder是否相关,所以过来问一下,麻烦了。

KeyboardHolder 版本 v1.12.19 鼠须管 版本 1.0.2

前半段切换正常,后半段切换有问题

2024-06-09 11:40:47:509 [854108][AppDelegate:585]: cache status: com.roam-research.desktop-app 鼠须管
2024-06-09 11:40:47:510 [854108][AppDelegate:761]: change: 鼠须管 for identifer: com.roam-research.desktop-app
2024-06-09 11:40:47:510 [854108][AppDelegate:762]: start change.
2024-06-09 11:40:47:534 [854108][AppDelegate:674]: NSNotificationName(_rawValue: com.apple.Carbon.TISNotifySelectedKeyboardInputSourceChanged)
nil
2024-06-09 11:40:47:537 [854108][AppDelegate:712]: changing, skip input source change notify.
2024-06-09 11:40:47:537 [854108][AppDelegate:714]: changingIdentifer:com.roam-research.desktop-app,currentAppBundleId:com.roam-research.desktop-app,changingSource:Optional("im.rime.inputmethod.Squirrel.Hans"),currentSource:Optional("im.rime.inputmethod.Squirrel.Hans")
2024-06-09 11:40:47:538 [854108][AppDelegate:716]: change finish
2024-06-09 11:40:47:538 [854108][AppDelegate:674]: NSNotificationName(_rawValue: com.apple.Carbon.TISNotifySelectedKeyboardInputSourceChanged)
nil
2024-06-09 11:40:47:538 [854108][AppDelegate:678]: Optional(KeyboardHolder.InputSource) Optional(KeyboardHolder.InputSource)
2024-06-09 11:41:01:242 [854108][AppDelegate:384]: focusedUIElementChanged on  pid:[24163] info: [:] at com.roam-research.desktop-app
2024-06-09 11:41:01:294 [854108][Util:321]: focus element: Optional(<AXTextArea "<AXUIElement 0x60000328e160> {pid=24163}" (pid=24163)>)
2024-06-09 11:41:01:295 [854108][AppDelegate:526]: --- end for app[24163:Optional("com.roam-research.desktop-app")] switch flag[textAreaActived ]
2024-06-09 11:41:01:295 [854108][SwitchDecision:261]: TextAreaActive: runningApp.bundleIdentifier: Optional("com.roam-research.desktop-app") appDelegate.currentAppBundleId: com.roam-research.desktop-app
2024-06-09 11:41:01:295 [854108][SwitchDecision:262]: TextAreaActive: appDelegate.settingData!.inputSourceTip: false && flag.has(SwitchFlag.textAreaActived): true && runningApp.bundleIdentifier == appDelegate.currentAppBundleId: true && appDelegate.settingData?.textAreaTip ?? false: false 
2024-06-09 11:41:03:730 [854108][AppDelegate:585]: cache status: com.roam-research.desktop-app ABC
2024-06-09 11:41:03:731 [854108][AppDelegate:761]: change: ABC for identifer: com.roam-research.desktop-app
2024-06-09 11:41:03:731 [854108][AppDelegate:762]: start change.
2024-06-09 11:41:03:752 [854108][AppDelegate:674]: NSNotificationName(_rawValue: com.apple.Carbon.TISNotifySelectedKeyboardInputSourceChanged)
nil
2024-06-09 11:41:03:753 [854108][AppDelegate:712]: changing, skip input source change notify.
2024-06-09 11:41:03:753 [854108][AppDelegate:714]: changingIdentifer:com.roam-research.desktop-app,currentAppBundleId:com.roam-research.desktop-app,changingSource:Optional("com.apple.keylayout.ABC"),currentSource:Optional("com.apple.keylayout.ABC")
2024-06-09 11:41:03:753 [854108][AppDelegate:716]: change finish
2024-06-09 11:41:04:389 [854108][AppDelegate:384]: focusedUIElementChanged on  pid:[24163] info: [:] at com.roam-research.desktop-app
2024-06-09 11:41:04:454 [854108][Util:321]: focus element: Optional(<AXTextArea "<AXUIElement 0x6000032d4990> {pid=24163}" (pid=24163)>)
2024-06-09 11:41:04:455 [854108][AppDelegate:526]: --- end for app[24163:Optional("com.roam-research.desktop-app")] switch flag[textAreaActived ]
2024-06-09 11:41:04:455 [854108][SwitchDecision:261]: TextAreaActive: runningApp.bundleIdentifier: Optional("com.roam-research.desktop-app") appDelegate.currentAppBundleId: com.roam-research.desktop-app
2024-06-09 11:41:04:455 [854108][SwitchDecision:262]: TextAreaActive: appDelegate.settingData!.inputSourceTip: false && flag.has(SwitchFlag.textAreaActived): true && runningApp.bundleIdentifier == appDelegate.currentAppBundleId: true && appDelegate.settingData?.textAreaTip ?? false: false 
2024-06-09 11:41:21:212 [854108][AppDelegate:585]: cache status: com.roam-research.desktop-app 鼠须管
2024-06-09 11:41:21:212 [854108][AppDelegate:761]: change: 鼠须管 for identifer: com.roam-research.desktop-app
2024-06-09 11:41:21:213 [854108][AppDelegate:762]: start change.
2024-06-09 11:41:21:233 [854108][AppDelegate:674]: NSNotificationName(_rawValue: com.apple.Carbon.TISNotifySelectedKeyboardInputSourceChanged)
nil
2024-06-09 11:41:21:234 [854108][AppDelegate:712]: changing, skip input source change notify.
2024-06-09 11:41:21:234 [854108][AppDelegate:714]: changingIdentifer:com.roam-research.desktop-app,currentAppBundleId:com.roam-research.desktop-app,changingSource:Optional("im.rime.inputmethod.Squirrel.Hans"),currentSource:Optional("im.rime.inputmethod.Squirrel.Hans")
2024-06-09 11:41:21:234 [854108][AppDelegate:716]: change finish
leaves615 commented 4 months ago

这个是apple 的carbon api 的一个缺陷。很早之前就出现了,CJK第三方输入法都存在这个问题。 鉴于apple没有提供新的api或修复该问题的情况下,无解。