summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2013-08-28 12:55:27 +0200
committerAmaury Pouly <amaury.pouly@gmail.com>2013-08-28 13:06:46 +0200
commit74761b70acd96cecc0d35450dd56a98ad9ee7d3d (patch)
tree40dd734d1740bff8af116a5641d34837f47625d7
parenta2a2e14e0d400e1c82b4d02c4399602488578dc6 (diff)
zenxfi2: use sensible keymap and simulator keys
Change-Id: Icd718b34924e1d228bbd6662617152646ef0c3a5
-rw-r--r--apps/keymaps/keymap-zenxfi2.c4
-rw-r--r--uisimulator/buttonmap/creative-zenxfi2.c16
2 files changed, 13 insertions, 7 deletions
diff --git a/apps/keymaps/keymap-zenxfi2.c b/apps/keymaps/keymap-zenxfi2.c
index 2f8d503b78..c98a4a8405 100644
--- a/apps/keymaps/keymap-zenxfi2.c
+++ b/apps/keymaps/keymap-zenxfi2.c
@@ -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)
diff --git a/uisimulator/buttonmap/creative-zenxfi2.c b/uisimulator/buttonmap/creative-zenxfi2.c
index ae56599b69..e9aa1d134a 100644
--- a/uisimulator/buttonmap/creative-zenxfi2.c
+++ b/uisimulator/buttonmap/creative-zenxfi2.c
@@ -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" }
};