zenxfi2: use sensible keymap and simulator keys

Change-Id: Icd718b34924e1d228bbd6662617152646ef0c3a5
This commit is contained in:
Amaury Pouly 2013-08-28 12:55:27 +02:00
parent a2a2e14e0d
commit 74761b70ac
2 changed files with 13 additions and 7 deletions

View file

@ -128,8 +128,8 @@ static const struct button_mapping button_context_keyboard[] = {
}; /* button_context_keyboard */
static const struct button_mapping button_context_radio[] = {
{ ACTION_FM_MENU, BUTTON_MENU|BUTTON_REL, BUTTON_NONE },
{ ACTION_FM_PRESET, BUTTON_MENU|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_FM_EXIT, BUTTON_MENU|BUTTON_REL, BUTTON_NONE },
{ ACTION_FM_MENU, BUTTON_MENU|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_STD_KEYLOCK, BUTTON_POWER, BUTTON_NONE },
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS)

View file

@ -29,18 +29,24 @@ int key_to_button(int keyboard_button)
int new_btn = BUTTON_NONE;
switch (keyboard_button)
{
case SDLK_PAGEDOWN:
new_btn = BUTTON_MENU;
break;
case SDLK_HOME:
case SDLK_ESCAPE:
case SDLK_BACKSPACE:
case SDLK_DELETE:
new_btn = BUTTON_POWER;
break;
case SDLK_KP_ENTER:
case SDLK_RETURN:
case SDLK_SPACE:
case SDLK_INSERT:
new_btn = BUTTON_MENU;
break;
}
return new_btn;
}
struct button_map bm[] = {
{ SDLK_PAGEDOWN, 162, 136, 26, "Menu" },
{ SDLK_RETURN, 162, 136, 26, "Menu" },
{ SDLK_ESCAPE, 315, 514, 26, "Power" },
{ 0, 0, 0, 0, "None" }
};