On the Parrot Asteroid there is only a scroll wheel that creates the
keycodes 19 and 20 for vertical navigation. The device also has media
buttons, specifically 87 and 88. I would like to translate these into the
horizontal dpad keys to allow users the selection of buttons that are in a
row. I tried this
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if(keyCode == KeyEvent.KEYCODE_MEDIA_PREVIOUS)
keyCode = KeyEvent.KEYCODE_DPAD_LEFT;
if(keyCode == KeyEvent.KEYCODE_MEDIA_NEXT)
keyCode = KeyEvent.KEYCODE_DPAD_RIGHT;
return super.onKeyDown(keyCode, event);
}
and while the keys are properly recognized they don't seem to translate
into shifting the focus. Any ideas?
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en