如何通过IOHIDEvent模拟触摸事件? [英] How can I simulate the touch events by IOHIDEvent?

查看:661
本文介绍了如何通过IOHIDEvent模拟触摸事件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在iOS 6上模拟触摸事件.我从IOHIDEvent中学到了一些有用的东西,这是用于人机界面设备的低级功能包.

I want to simulate touch events on iOS 6. I learned something useful from IOHIDEvent, which is a low-level functions bundle for human interface devices.

来自: https://github.com/kennytm/iphone-private-frameworks/tree/master/IOKit/hid 我得到了带有IOHIDEvent的私有框架,但是在iOS 4之后标头已更改,并且不再支持某些功能.

From: https://github.com/kennytm/iphone-private-frameworks/tree/master/IOKit/hid I got the private framework with IOHIDEvent, but the headers were changed after iOS 4, and some functions were not supported any more.

有人知道如何在iOS6中获取功能,还是知道如何在系统级模拟事件?

Does anyone know how to get the functions in iOS6, or known how to simulate the events at system-level?

推荐答案

正如我在回答您今天的其他问题时所提到的,您可以尝试从GraphicsServices.framework或IOKit.framework中查看GSEvent.h.

As I mentioned in my answer to your other question today, you might try looking at GSEvent.h from GraphicsServices.framework, or in IOKit.framework.

关于stackoverflow的一些好答案可以帮助您:

Here are some good answers on stackoverflow to help you:

iOS专用API:锁定设备并关闭屏幕电源

GSSendEvent-注入触摸事件iOS

iOS触摸事件通知(私有API)

这篇关于如何通过IOHIDEvent模拟触摸事件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆