adb shell getevent –t 查看当前按下按键的值
按下返回
[1556162527.777123] /dev/input/event6: 0001 009e 00000001
[1556162527.777123] /dev/input/event6: 0000 0000 00000000
送开返回
[1556162530.504152] /dev/input/event6: 0003 0030 00000000
[1556162530.504152] /dev/input/event6: 0003 0032 00000000
[1556162530.504152] /dev/input/event6: 0000 0002 00000000
[1556162530.504152] /dev/input/event6: 0000 0000 00000000
[1556162530.525527] /dev/input/event6: 0001 009e 00000000
[1556162530.525527] /dev/input/event6: 0000 0000 00000000

事件类型(0001),事件代码(0074)以及事件的值(00000001)

adb shell input keyevent 4 返回按键

android系统input事件处理流程

android input总结
内核将原始事件写入到设备节点中,InputReader不断地通过EventHub将原始事件取出来并翻译加工成Android输入事件,然后交给InputDispatcher。InputDispatcher根据WMS提供的窗口信息将事件交给合适的窗口。窗口的ViewRootImpl对象再沿着控件树将事件派发给感兴趣的控件。控件对其收到的事件作出响应,更新自己的画面、执行特定的动作

相关文章:

  • 2022-02-02
  • 2022-12-23
  • 2021-11-30
  • 2021-12-27
  • 2021-05-07
  • 2022-01-10
  • 2021-07-24
  • 2021-11-23
猜你喜欢
  • 2022-12-23
  • 2022-03-01
  • 2022-12-23
  • 2022-12-23
  • 2021-08-11
  • 2022-01-07
相关资源
相似解决方案