Run action on OTG key pressed

Post your questions and help other users.

Moderator: Martin

Post Reply
Kuleszka
Posts: 2
Joined: 06 Aug 2013 12:43

Run action on OTG key pressed

Post by Kuleszka » 06 Aug 2013 12:51

Hello.
Is ther a way that after connecting USB keyboard/gamepad and pressing buttons on them ther will be actions trigered?
I found here keycodes http://developer.android.com/reference/ ... Event.html
but I don't know how to assign them to specific actions.

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Run action on OTG key pressed

Post by Martin » 06 Aug 2013 16:45

Hi,

Sorry, intercepting keyboard keys is currently not supported.

Regards,
Martin

Kuleszka
Posts: 2
Joined: 06 Aug 2013 12:43

Re: Run action on OTG key pressed

Post by Kuleszka » 06 Aug 2013 17:02

Will it ever be?

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Run action on OTG key pressed

Post by Martin » 06 Aug 2013 18:48

I doubt that intercepting keystrokes in the background is possible using official API and most probably requires root (if it's possible at all).
I added it to my todo list to check the feasibility but this will take some time.

Post Reply