Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我能够从 Android 手机上的 dev/input/event* 读取事件。然而,它们是特定顺序的行代码,就像触摸事件给出的那样。
3 53 216 3 54 444 3 48 40 3 50 5 0 2 0 0 0 0
如何将它们解析为有意义的事件,例如 x 和 y 坐标处的触摸?或长按等。然后我想将高级事件转换回类似的代码以将它们插入事件队列中。
有没有人有 C/C++ 中的解析器代码?
非常感谢任何帮助。
您可以在 external\kernel-headers\original\linux\Input.h 中看到 android 内核源代码中定义的 struct input_event
我知道这个问题很老,但这是答案http://blog.softteco.com/2011/03/android-writing-events-low-level-touch.html