Closed peplin closed 10 years ago
Key mapping is actually not supported in the capacity we need - you can only specify keys for predefined emulator events:
BUTTON_HOME BUTTON_VOLUME_DOWN BUTTON_DPAD_CENTER
BUTTON_MENU BUTTON_CAMERA BUTTON_DPAD_LEFT
BUTTON_STAR CHANGE_LAYOUT_PREV BUTTON_DPAD_RIGHT
BUTTON_BACK CHANGE_LAYOUT_NEXT BUTTON_DPAD_UP
BUTTON_CALL TOGGLE_NETWORK BUTTON_DPAD_DOWN
BUTTON_HANGUP TOGGLE_TRACING ONION_ALPHA_UP
BUTTON_POWER TOGGLE_FULLSCREEN ONION_ALPHA_DOWN
BUTTON_SEARCH TOGGLE_TRACKBALL
BUTTON_VOLUME_UP SHOW_TRACKBALL
Short of changing the source of the emulator, I think the best thing we can recommend is to implement button event handlers in your application to accept either VehicleButtonEvent from OpenXC or the plain key events from Android.
I've documented the recommended method in openxc-android - we can revisit a custom emulator in the future.
A combination of an emulator skin with:
http://stackoverflow.com/questions/5567475/adding-a-button-to-the-android-emulator-skin
http://heikobehrens.net/2011/03/15/android-skins/