diff --git a/apps/keymaps/keymap-cowond2.c b/apps/keymaps/keymap-cowond2.c index 2e412458e1..7ba2d8b02b 100644 --- a/apps/keymaps/keymap-cowond2.c +++ b/apps/keymaps/keymap-cowond2.c @@ -137,8 +137,13 @@ static const struct button_mapping button_context_pitchscreen[] = { }; /* button_context_pitchcreen */ static const struct button_mapping button_context_keyboard[] = { + { ACTION_KBD_PAGE_FLIP, BUTTON_MENU, BUTTON_NONE }, + { ACTION_KBD_CURSOR_LEFT, BUTTON_MINUS, BUTTON_NONE }, + { ACTION_KBD_CURSOR_LEFT, BUTTON_MINUS|BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_KBD_CURSOR_RIGHT, BUTTON_PLUS, BUTTON_NONE }, + { ACTION_KBD_CURSOR_RIGHT, BUTTON_PLUS|BUTTON_REPEAT, BUTTON_NONE }, + LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) - //LAST_ITEM_IN_LIST }; /* button_context_keyboard */ const struct button_mapping* target_get_context_mapping(int context) diff --git a/apps/keymaps/keymap-touchscreen.c b/apps/keymaps/keymap-touchscreen.c index a56eefd427..5392431026 100644 --- a/apps/keymaps/keymap-touchscreen.c +++ b/apps/keymaps/keymap-touchscreen.c @@ -59,17 +59,19 @@ static const struct button_mapping button_context_standard[] = { { ACTION_STD_OK, BUTTON_CENTER|BUTTON_REL, BUTTON_CENTER }, { ACTION_STD_OK, BUTTON_MIDRIGHT|BUTTON_REL, BUTTON_MIDRIGHT }, { ACTION_STD_OK, BUTTON_MIDRIGHT|BUTTON_REPEAT, BUTTON_MIDRIGHT }, + { ACTION_STD_CANCEL, BUTTON_MIDLEFT, BUTTON_NONE }, + { ACTION_STD_CANCEL, BUTTON_MIDLEFT|BUTTON_REPEAT, BUTTON_NONE }, { ACTION_STD_MENU, BUTTON_TOPLEFT, BUTTON_NONE }, { ACTION_STD_QUICKSCREEN, BUTTON_TOPLEFT|BUTTON_REPEAT, BUTTON_NONE }, { ACTION_STD_CONTEXT, BUTTON_CENTER|BUTTON_REPEAT, BUTTON_CENTER }, - { ACTION_STD_CANCEL, BUTTON_MIDLEFT, BUTTON_NONE }, - { ACTION_STD_CANCEL, BUTTON_MIDLEFT|BUTTON_REPEAT, BUTTON_NONE }, + LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM2|CONTEXT_STD) }; /* button_context_standard */ static const struct button_mapping button_context_wps[] = { + { ACTION_WPS_PLAY, BUTTON_TOPRIGHT|BUTTON_REL, BUTTON_TOPRIGHT }, { ACTION_WPS_SKIPNEXT, BUTTON_MIDRIGHT|BUTTON_REL, BUTTON_MIDRIGHT }, { ACTION_WPS_SKIPPREV, BUTTON_MIDLEFT|BUTTON_REL, BUTTON_MIDLEFT }, @@ -78,8 +80,10 @@ static const struct button_mapping button_context_wps[] = { { ACTION_WPS_STOPSEEK, BUTTON_MIDLEFT|BUTTON_REL, BUTTON_MIDLEFT|BUTTON_REPEAT }, { ACTION_WPS_STOPSEEK, BUTTON_MIDRIGHT|BUTTON_REL, BUTTON_MIDRIGHT|BUTTON_REPEAT }, + { ACTION_WPS_BROWSE, BUTTON_CENTER|BUTTON_REL, BUTTON_CENTER }, { ACTION_WPS_CONTEXT, BUTTON_CENTER|BUTTON_REPEAT, BUTTON_CENTER }, - { ACTION_WPS_QUICKSCREEN, BUTTON_TOPRIGHT|BUTTON_REPEAT, BUTTON_TOPRIGHT }, + { ACTION_WPS_QUICKSCREEN, BUTTON_TOPLEFT|BUTTON_REPEAT, BUTTON_TOPLEFT }, + LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM2|CONTEXT_WPS) }; /* button_context_wps */ @@ -103,6 +107,8 @@ static const struct button_mapping button_context_list[] = { }; /* button_context_list */ static const struct button_mapping button_context_tree[] = { + { ACTION_TREE_WPS, BUTTON_TOPRIGHT|BUTTON_REL, BUTTON_TOPRIGHT }, + LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM2|CONTEXT_CUSTOM2|CONTEXT_TREE) }; /* button_context_tree */ @@ -136,15 +142,17 @@ static const struct button_mapping button_context_settings_right_is_inc[] = { { ACTION_SETTINGS_DECREPEAT, BUTTON_MIDLEFT|BUTTON_REPEAT, BUTTON_NONE }, { ACTION_STD_OK, BUTTON_CENTER, BUTTON_NONE }, { ACTION_STD_CANCEL, BUTTON_TOPLEFT, BUTTON_NONE }, + LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM2|CONTEXT_CUSTOM|CONTEXT_SETTINGS) }; /* button_context_settingsgraphical */ static const struct button_mapping button_context_yesno[] = { - { ACTION_YESNO_ACCEPT, BUTTON_MIDLEFT, BUTTON_NONE }, + { ACTION_YESNO_ACCEPT, BUTTON_TOPRIGHT, BUTTON_NONE }, LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM2|CONTEXT_YESNOSCREEN) }; /* button_context_settings_yesno */ static const struct button_mapping button_context_colorchooser[] = { + { ACTION_STD_OK, BUTTON_CENTER|BUTTON_REL, BUTTON_NONE }, LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM2|CONTEXT_SETTINGS_COLOURCHOOSER), }; /* button_context_colorchooser */ @@ -193,6 +201,24 @@ static const struct button_mapping button_context_pitchscreen[] = { static const struct button_mapping button_context_keyboard[] = { + { ACTION_KBD_LEFT, BUTTON_MIDLEFT, BUTTON_NONE }, + { ACTION_KBD_LEFT, BUTTON_MIDLEFT|BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_KBD_RIGHT, BUTTON_MIDRIGHT, BUTTON_NONE }, + { ACTION_KBD_RIGHT, BUTTON_MIDRIGHT|BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_KBD_CURSOR_LEFT, BUTTON_TOPLEFT, BUTTON_NONE }, + { ACTION_KBD_CURSOR_LEFT, BUTTON_TOPLEFT|BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_KBD_CURSOR_RIGHT, BUTTON_TOPRIGHT, BUTTON_NONE }, + { ACTION_KBD_CURSOR_RIGHT, BUTTON_TOPRIGHT|BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_KBD_SELECT, BUTTON_CENTER|BUTTON_REL, BUTTON_NONE }, + { ACTION_KBD_DONE, BUTTON_CENTER|BUTTON_REPEAT, BUTTON_CENTER }, + { ACTION_KBD_ABORT, BUTTON_POWER, BUTTON_NONE }, + { ACTION_KBD_BACKSPACE, BUTTON_BOTTOMLEFT, BUTTON_NONE }, + { ACTION_KBD_BACKSPACE, BUTTON_BOTTOMLEFT|BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_KBD_UP, BUTTON_TOPMIDDLE, BUTTON_NONE }, + { ACTION_KBD_UP, BUTTON_TOPMIDDLE|BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_KBD_DOWN, BUTTON_BOTTOMMIDDLE, BUTTON_NONE }, + { ACTION_KBD_DOWN, BUTTON_BOTTOMMIDDLE|BUTTON_REPEAT, BUTTON_NONE }, + LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM2|CONTEXT_KEYBOARD) }; /* button_context_keyboard */ diff --git a/apps/plugins/rockboy/rockboy.c b/apps/plugins/rockboy/rockboy.c index 1de2c2f4d1..1addef2e44 100644 --- a/apps/plugins/rockboy/rockboy.c +++ b/apps/plugins/rockboy/rockboy.c @@ -193,6 +193,7 @@ static void setoptions (void) options.START=BUTTON_REW; options.SELECT=BUTTON_NONE; options.MENU=BUTTON_POWER; + #elif CONFIG_KEYPAD == MROBE500_PAD options.UP=BUTTON_RC_PLAY; options.DOWN=BUTTON_RC_DOWN; @@ -204,7 +205,11 @@ static void setoptions (void) options.START=BUTTON_RC_HEART; options.SELECT=BUTTON_RC_MODE; options.MENU=BUTTON_POWER; + #elif CONFIG_KEYPAD == COWOND2_PAD + options.A=BUTTON_PLUS; + options.B=BUTTON_MINUS; + options.MENU=BUTTON_MENU; #elif CONFIG_KEYPAD == GIGABEAT_S_PAD options.UP=BUTTON_UP; @@ -222,12 +227,13 @@ static void setoptions (void) #ifdef HAVE_TOUCHSCREEN options.UP=BUTTON_TOPMIDDLE; options.DOWN=BUTTON_BOTTOMMIDDLE; - - options.A=BUTTON_MIDLEFT; - options.B=BUTTON_MIDRIGHT; options.START=BUTTON_TOPRIGHT; options.SELECT=BUTTON_CENTER; +#if CONFIG_KEYPAD != COWOND2_PAD + options.A=BUTTON_BOTTOMLEFT; + options.B=BUTTON_BOTTOMRIGHT; options.MENU=BUTTON_TOPLEFT; +#endif #endif options.maxskip=4;