Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WPF捕获键盘事件 #193

Open
soapgu opened this issue Mar 1, 2023 · 0 comments
Open

WPF捕获键盘事件 #193

soapgu opened this issue Mar 1, 2023 · 0 comments
Labels

Comments

@soapgu
Copy link
Owner

soapgu commented Mar 1, 2023

  • 需求

WPF的键盘捕获都是依赖Windows或者是UserControl下面的KeyDown事件。
由于出去架构和依赖等因素考虑,我想要解耦WPF控件。

  • 有趣的探索之旅

搜了百度和Github,结果都不是太理想,看到利用win32的api来做钩子的方案,不怀疑可行性,只是方案太古老。
一时兴起尝试下最近火热的ChatGPT。
由于ChatGPT对国内账号以及翻墙IP的限制,暂时用不了原版的,只能用第三方的。但是这效率真的惊艳
图片
第一个回答方向问题不大
可能遇到具体的参数API用法还是不太会
图片
进一步,但是差临门一脚!
图片
这竟然也行!
图片

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant