GSEvent创建按键事件

发布于 2024-12-04 12:31:39 字数 658 浏览 2 评论 0原文

我是越狱编程新手。 执行以下代码时:

if ($GSEventCreateKeyEvent != NULL) {
    string = CFStringCreateWithCharacters(kCFAllocatorDefault, &unicode, 1);
    event0 = (*$GSEventCreateKeyEvent)(10, point, string, string, nil, 0, 0, 1);
    event1 = (*$GSEventCreateKeyEvent)(11, point, string, string, nil, 0, 0, 1);
} else if ($GSCreateSyntheticKeyEvent != NULL) {
    event0 = (*$GSCreateSyntheticKeyEvent)(unicode, YES, YES);
    GSEventRecord *record(_GSEventGetGSEventRecord(event0));
    record->type = GSEventTypeKeyDown;
} else return;

解密 GSEventCreateKeyEvent 和 GSCreateSyntheticKeyEvent 后。 这两个方法都无法识别并且函数返回。 我想念什么? 谢谢, 大卫

I'm new to jailbreak programming.
When executing the following code:

if ($GSEventCreateKeyEvent != NULL) {
    string = CFStringCreateWithCharacters(kCFAllocatorDefault, &unicode, 1);
    event0 = (*$GSEventCreateKeyEvent)(10, point, string, string, nil, 0, 0, 1);
    event1 = (*$GSEventCreateKeyEvent)(11, point, string, string, nil, 0, 0, 1);
} else if ($GSCreateSyntheticKeyEvent != NULL) {
    event0 = (*$GSCreateSyntheticKeyEvent)(unicode, YES, YES);
    GSEventRecord *record(_GSEventGetGSEventRecord(event0));
    record->type = GSEventTypeKeyDown;
} else return;

After declering both the GSEventCreateKeyEvent and GSCreateSyntheticKeyEvent.
Both of the method are not identify and the function returns.
What do I miss?
Thanks,
David

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

天煞孤星 2024-12-11 12:31:39

我不明白你的问题。

要注入按键事件,您可以使用

int hid_inject_text(const char * utf8_text);

hid-support 项目中的 网址为 http://code.google.com/p/hid-support/

I don't understand your question.

To inject key events, you can use

int hid_inject_text(const char * utf8_text);

from the hid-support project at http://code.google.com/p/hid-support/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文