修复部分应用无法输入的问题#1120
Draft
seaurching wants to merge 1 commit intorime:masterfrom
Draft
Conversation
2、兼容SecureCRT中英文状态下正常输入 3、自动检测安装目录,可以放到/Library/Input Mehots也可以放到$HOME/Library/Input Methods
Author
|
目前在蘋果筆記本上必須要按住ctrl+backspace才能向前刪除不,向後刪除還沒有修復 |
Member
|
這一改動超出了系統設計的輸入法框架。 |
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.
通过联调发现框架在VanDyke的SecureCRT下无法正常输入,其应用日志是:
根据以上内容获取得出结论:
SecureCRT 使用的 Qt 框架没有正确将 keyDown 事件传递给 macOS InputMethodKit,导致输入法无法接收键盘事件。
因此解决方案: 使用 CGEventTap 监听全局键盘事件,绕过 Qt 的问题。
因为macOS 输入法架构是被动的:
所以基于上述问题给出修复内容:
1、添加辅助权限,安装后可以弹出对话框开启
2、兼容SecureCRT中英文状态下正常输入
3、自动检测安装目录,可以放到/Library/Input Mehots也可以放到$HOME/Library/Input Methods