Set mouse position in software

百般思念 提交于 2019-12-03 12:22:46

Mouse event is managed by the system framework. You cannot control it on Java side.

On the adb shell you can open /dev/input/uevent device to write mouse events include

  1. relative movement
  2. click action
  3. absolute position (you might want this)

However, you cannot do it as a normal application, unless you do it on a rooted device, or you can use adb shell to start a daemon service in the background to perform the event writing for your application.

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