How to perform a fake DPAD click on Android?

会有一股神秘感。 提交于 2019-12-24 15:07:47

问题


I know how to identifie the DPAD click, but i want perform a DPAD click using the Volume UP and Down buttons. How can i do this? Thanks!


回答1:


If you just want to test your APP against DPAD key events, you can simulate in ADB shell, with following commands:

input keyevent DPAD_LEFT
input keyevent DPAD_RIGHT
input keyevent DPAD_UP
input keyevent DPAD_DOWN
input keyevent DPAD_CENTER


来源:https://stackoverflow.com/questions/28971869/how-to-perform-a-fake-dpad-click-on-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!