Reputation: 611
This might be a bit of an ambiguous question but I'll do my best at describing what I want to do. I need to make a service that will trigger a physical button press or input code to the currently active application. I'm trying to make a mapper for the Xperia Play touch pads so they can be used with apps and games that don't support them but mapping each axis corner to a physical keyboard key or input.
I can imagine such a feature would be a security risk to include in the standard Android SDK, although I may be wrong in which case there might be some kind of Intent or Receiver to handle those events.
If there isn't, does anyone know how I could go about doing what I want to do?
Upvotes: 1
Views: 2767
Reputation: 7722
You cannot do this in a normal App, but you have two other options depending on your needs:
xvkbd
or xdotool
Upvotes: 0
Reputation: 10368
Try sendkey command in you adb shell.
You cannot do it in application yet.
Upvotes: 1