2

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!

  • You probably *cannot* do this on a *stock* device to any app other than your own. For your own, it would likely be easier to detect and handle those events in parallel, rather than try to make them impersonate others. – Chris Stratton Mar 10 '15 at 19:18
  • How can i perform a dpad click? If you can, share a code, please. – Eduardo Bachiega Mar 10 '15 at 19:20
  • I was suggesting you don't try to, but rather try to achieve the desired functionality *in your application* by responding to the volume keys instead. If it isn't your application, you probably cannot do this. – Chris Stratton Mar 10 '15 at 19:24

1 Answers1

5

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
Robin
  • 10,052
  • 6
  • 31
  • 52