获取所有应用程序中的键盘光标位置/坐标

发布于 2024-09-28 16:11:48 字数 423 浏览 1 评论 0原文

现在,我正在使用函数 GetCaretPos()GetGUIThreadInfo() 来获取当前键盘光标/插入符坐标。这些在记事本和写字板等应用程序中可以正常工作,并返回正确的坐标,但在 Firefox、Thunderbird 等应用程序中,无论键盘光标在哪里,返回的坐标始终为 0, 0。

我知道在这些应用程序中获取键盘光标/插入符坐标并非不可能,因为当我使用 Yahoo KeyKey< /a> IME 在其中,它会在键盘光标所在的位置弹出一个对话框。

问题是,由于 KeyKey 不是开源的,我不知道它是如何做到的。

如果有人能指出我正确的方向或知道使用它的正确功能,我将不胜感激!

Right now I'm using the functions GetCaretPos() and GetGUIThreadInfo() to get the current keyboard cursor/caret coordinates. These work properly in applications like Notepad and Wordpad and return the correct coordinates, but in applications such as Firefox, Thunderbird, and others, the coordinates returned are always 0, 0, no matter where the keyboard cursor is.

I know it's not impossible to get the keyboard cursor/caret coordinates in these applications because when I use the Yahoo KeyKey IME in them, it pops-up a dialog right where the keyboard cursor is positioned.

Problem is, since KeyKey is not open source, I have no idea how it's doing it.

If anyone could point me in the right direction or knows the correct function(s) to use it'd be much appreciated!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文