diff --git a/apps/keymaps/keymap-m3.c b/apps/keymaps/keymap-m3.c index 6b68f1f881..c5c0796644 100644 --- a/apps/keymaps/keymap-m3.c +++ b/apps/keymaps/keymap-m3.c @@ -137,13 +137,13 @@ static const struct button_mapping remote_button_context_keyboard[] = { { ACTION_KBD_LEFT, BUTTON_RC_REW|BUTTON_REPEAT, BUTTON_NONE }, { ACTION_KBD_RIGHT, BUTTON_RC_FF, BUTTON_NONE }, { ACTION_KBD_RIGHT, BUTTON_RC_FF|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_KBD_UP, BUTTON_RC_VOL_DOWN, BUTTON_NONE }, - { ACTION_KBD_UP, BUTTON_RC_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_KBD_DOWN, BUTTON_RC_VOL_UP, BUTTON_NONE }, - { ACTION_KBD_DOWN, BUTTON_RC_VOL_UP|BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_KBD_UP, BUTTON_RC_VOL_UP, BUTTON_NONE }, + { ACTION_KBD_UP, BUTTON_RC_VOL_UP|BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_KBD_DOWN, BUTTON_RC_VOL_DOWN, BUTTON_NONE }, + { ACTION_KBD_DOWN, BUTTON_RC_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE }, { ACTION_KBD_PAGE_FLIP, BUTTON_RC_MODE, BUTTON_NONE }, - { ACTION_KBD_SELECT, BUTTON_RC_PLAY|BUTTON_REL, BUTTON_PLAY }, - { ACTION_KBD_DONE, BUTTON_RC_PLAY|BUTTON_REPEAT, BUTTON_PLAY }, + { ACTION_KBD_SELECT, BUTTON_RC_PLAY|BUTTON_REL, BUTTON_RC_PLAY }, + { ACTION_KBD_DONE, BUTTON_RC_PLAY|BUTTON_REPEAT, BUTTON_RC_PLAY }, { ACTION_KBD_ABORT, BUTTON_RC_REC, BUTTON_NONE }, LAST_ITEM_IN_LIST @@ -423,6 +423,7 @@ static const struct button_mapping* get_context_mapping_remote( int context ) return remote_button_context_settings; case CONTEXT_SETTINGS_EQ: + case CONTEXT_SETTINGS_TIME: return remote_button_context_settings_r_is_inc; case CONTEXT_TREE: diff --git a/apps/keymaps/keymap-x5.c b/apps/keymaps/keymap-x5.c index 4401f790d4..b6d8f9bb50 100644 --- a/apps/keymaps/keymap-x5.c +++ b/apps/keymaps/keymap-x5.c @@ -61,14 +61,15 @@ static const struct button_mapping button_context_standard[] = { }; /* button_context_standard */ static const struct button_mapping remote_button_context_standard[] = { - { ACTION_STD_PREV, BUTTON_RC_REW, BUTTON_NONE }, - { ACTION_STD_PREVREPEAT, BUTTON_RC_REW|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_STD_NEXT, BUTTON_RC_FF, BUTTON_NONE }, - { ACTION_STD_NEXTREPEAT, BUTTON_RC_FF|BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_STD_PREV, BUTTON_RC_VOL_UP, BUTTON_NONE }, + { ACTION_STD_PREVREPEAT, BUTTON_RC_VOL_UP|BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_STD_NEXT, BUTTON_RC_VOL_DOWN, BUTTON_NONE }, + { ACTION_STD_NEXTREPEAT, BUTTON_RC_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_STD_CONTEXT, BUTTON_RC_PLAY|BUTTON_REPEAT, BUTTON_RC_PLAY }, - { ACTION_STD_CANCEL, BUTTON_RC_MODE, BUTTON_NONE }, - { ACTION_STD_OK, BUTTON_RC_PLAY|BUTTON_REL, BUTTON_RC_PLAY }, + { ACTION_STD_CONTEXT, BUTTON_RC_MODE|BUTTON_REPEAT, BUTTON_RC_MODE }, + { ACTION_STD_CANCEL, BUTTON_RC_REW, BUTTON_NONE }, + { ACTION_STD_OK, BUTTON_RC_FF, BUTTON_NONE }, + { ACTION_STD_OK, BUTTON_RC_PLAY, BUTTON_NONE }, { ACTION_STD_MENU, BUTTON_RC_MENU|BUTTON_REL, BUTTON_RC_MENU }, { ACTION_STD_QUICKSCREEN, BUTTON_RC_MENU|BUTTON_REPEAT, BUTTON_RC_MENU }, @@ -82,6 +83,12 @@ static const struct button_mapping button_context_bmark[] = { LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST), }; /* button_context_settings_bmark */ +static const struct button_mapping remote_button_context_bmark[] = { + { ACTION_BMS_DELETE, BUTTON_RC_REC|BUTTON_REPEAT, BUTTON_RC_REC }, + + LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST), +}; /* button_context_settings_bmark */ + /** FM Radio Screen **/ static const struct button_mapping button_context_radio[] = { { ACTION_FM_MENU, BUTTON_SELECT | BUTTON_REPEAT, BUTTON_NONE }, @@ -97,6 +104,20 @@ static const struct button_mapping button_context_radio[] = { LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS) }; /* button_context_radio */ +static const struct button_mapping remote_button_context_radio[] = { + { ACTION_FM_MENU, BUTTON_RC_MODE|BUTTON_REPEAT, BUTTON_RC_MODE }, + { ACTION_FM_PRESET, BUTTON_RC_MODE|BUTTON_REL, BUTTON_RC_MODE }, + { ACTION_FM_STOP, BUTTON_RC_PLAY|BUTTON_REPEAT, BUTTON_RC_PLAY }, + { ACTION_FM_PLAY, BUTTON_RC_PLAY|BUTTON_REL, BUTTON_RC_PLAY }, + { ACTION_FM_MODE, BUTTON_RC_REC|BUTTON_REPEAT, BUTTON_RC_REC }, + { ACTION_FM_EXIT, BUTTON_RC_MENU, BUTTON_NONE }, + { ACTION_STD_PREVREPEAT, BUTTON_RC_REW|BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_STD_NEXT, BUTTON_RC_FF, BUTTON_NONE }, + { ACTION_STD_NEXTREPEAT, BUTTON_RC_FF|BUTTON_REPEAT, BUTTON_NONE }, + + LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS) +}; /* remote_button_context_radio */ + /** Keyboard **/ static const struct button_mapping button_context_keyboard[] = { { ACTION_KBD_LEFT, BUTTON_LEFT, BUTTON_NONE }, @@ -116,27 +137,20 @@ static const struct button_mapping button_context_keyboard[] = { static const struct button_mapping remote_button_context_keyboard[] = { { ACTION_KBD_LEFT, BUTTON_RC_REW, BUTTON_NONE }, - { ACTION_KBD_LEFT, BUTTON_RC_REW|BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_KBD_LEFT, BUTTON_RC_REW|BUTTON_REPEAT, BUTTON_NONE }, { ACTION_KBD_RIGHT, BUTTON_RC_FF, BUTTON_NONE }, { ACTION_KBD_RIGHT, BUTTON_RC_FF|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_KBD_SELECT_REM, BUTTON_RC_REC|BUTTON_REL, BUTTON_NONE }, - { ACTION_KBD_SELECT_REM, BUTTON_RC_MENU|BUTTON_REL, BUTTON_NONE }, - { ACTION_KBD_DONE, BUTTON_RC_PLAY|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_KBD_ABORT, BUTTON_RC_MODE, BUTTON_NONE }, - { ACTION_KBD_UP, BUTTON_RC_VOL_DOWN, BUTTON_NONE }, - { ACTION_KBD_UP, BUTTON_RC_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_KBD_DOWN, BUTTON_RC_VOL_UP, BUTTON_NONE }, - { ACTION_KBD_DOWN, BUTTON_RC_VOL_UP|BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_KBD_UP, BUTTON_RC_VOL_UP, BUTTON_NONE }, + { ACTION_KBD_UP, BUTTON_RC_VOL_UP|BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_KBD_DOWN, BUTTON_RC_VOL_DOWN, BUTTON_NONE }, + { ACTION_KBD_DOWN, BUTTON_RC_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_KBD_PAGE_FLIP, BUTTON_RC_MODE, BUTTON_NONE }, + { ACTION_KBD_SELECT, BUTTON_RC_PLAY|BUTTON_REL, BUTTON_RC_PLAY }, + { ACTION_KBD_DONE, BUTTON_RC_PLAY|BUTTON_REPEAT, BUTTON_RC_PLAY }, + { ACTION_KBD_ABORT, BUTTON_RC_REC, BUTTON_NONE }, LAST_ITEM_IN_LIST -}; /* button_context_keyboard_h100remote */ - -static const struct button_mapping remote_button_context_mainmenu[] = { - { ACTION_STD_CANCEL, BUTTON_RC_VOL_DOWN, BUTTON_NONE }, - { ACTION_STD_OK, BUTTON_RC_VOL_UP, BUTTON_NONE }, - - LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) -}; /* remote_button_context_mainmenu */ +}; /* remote_button_context_keyboard */ /** Pitchscreen **/ static const struct button_mapping button_context_pitchscreen[] = { @@ -166,7 +180,8 @@ static const struct button_mapping remote_button_context_pitchscreen[] = { { ACTION_PS_NUDGE_LEFTOFF, BUTTON_RC_REW|BUTTON_REL, BUTTON_NONE }, { ACTION_PS_NUDGE_RIGHT, BUTTON_RC_FF, BUTTON_NONE }, { ACTION_PS_NUDGE_RIGHTOFF, BUTTON_RC_FF|BUTTON_REL, BUTTON_NONE }, - { ACTION_PS_RESET, BUTTON_RC_MODE, BUTTON_NONE }, + { ACTION_PS_TOGGLE_MODE, BUTTON_RC_MODE, BUTTON_NONE }, + { ACTION_PS_RESET, BUTTON_RC_REC, BUTTON_NONE }, { ACTION_PS_EXIT, BUTTON_RC_PLAY, BUTTON_NONE }, { ACTION_PS_SLOWER, BUTTON_RC_REW|BUTTON_REPEAT, BUTTON_NONE }, { ACTION_PS_FASTER, BUTTON_RC_FF|BUTTON_REPEAT, BUTTON_NONE }, @@ -198,6 +213,7 @@ static const struct button_mapping remote_button_context_quickscreen[] = { { ACTION_QS_LEFT, BUTTON_RC_REW|BUTTON_REPEAT, BUTTON_NONE }, { ACTION_QS_RIGHT, BUTTON_RC_FF, BUTTON_NONE }, { ACTION_QS_RIGHT, BUTTON_RC_FF|BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_STD_CANCEL, BUTTON_RC_REC, BUTTON_NONE }, LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) }; /* remote_button_context_quickscreen */ @@ -216,6 +232,19 @@ static const struct button_mapping button_context_recscreen[] = { LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) }; /* button_context_recscreen */ +static const struct button_mapping remote_button_context_recscreen[] = { + { ACTION_REC_PAUSE, BUTTON_RC_PLAY|BUTTON_REL, BUTTON_RC_PLAY }, + { ACTION_STD_CANCEL, BUTTON_RC_PLAY|BUTTON_REPEAT, BUTTON_RC_PLAY }, + { ACTION_REC_NEWFILE, BUTTON_RC_REC, BUTTON_NONE }, + { ACTION_STD_MENU, BUTTON_RC_MENU, BUTTON_NONE }, + { ACTION_SETTINGS_INC, BUTTON_RC_FF, BUTTON_NONE }, + { ACTION_SETTINGS_INCREPEAT, BUTTON_RC_FF|BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_SETTINGS_DEC, BUTTON_RC_REW, BUTTON_NONE }, + { ACTION_SETTINGS_DECREPEAT, BUTTON_RC_REW|BUTTON_REPEAT, BUTTON_NONE }, + + LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) +}; /* remote_button_context_recscreen */ + /** Settings - General Mappings **/ static const struct button_mapping button_context_settings[] = { { ACTION_SETTINGS_INC, BUTTON_UP, BUTTON_NONE }, @@ -228,6 +257,17 @@ static const struct button_mapping button_context_settings[] = { LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) }; /* button_context_settings */ +static const struct button_mapping remote_button_context_settings[] = { + { ACTION_SETTINGS_INC, BUTTON_RC_VOL_UP, BUTTON_NONE }, + { ACTION_SETTINGS_INCREPEAT, BUTTON_RC_VOL_UP|BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_SETTINGS_DEC, BUTTON_RC_VOL_DOWN, BUTTON_NONE }, + { ACTION_SETTINGS_DECREPEAT, BUTTON_RC_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_STD_PREV, BUTTON_RC_REW, BUTTON_NONE }, + { ACTION_STD_CANCEL, BUTTON_RC_REC, BUTTON_NONE }, + + LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) +}; /* remote_button_context_settings */ + /** Settings - Using Sliders **/ static const struct button_mapping button_context_settings_r_is_inc[] = { { ACTION_SETTINGS_INC, BUTTON_RIGHT, BUTTON_NONE }, @@ -244,14 +284,11 @@ static const struct button_mapping button_context_settings_r_is_inc[] = { }; /* button_context_settings_r_is_inc */ static const struct button_mapping remote_button_context_settings_r_is_inc[] = { - { ACTION_SETTINGS_INC, BUTTON_RC_VOL_UP, BUTTON_NONE }, - { ACTION_SETTINGS_INCREPEAT, BUTTON_RC_VOL_UP|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_SETTINGS_DEC, BUTTON_RC_VOL_DOWN, BUTTON_NONE }, - { ACTION_SETTINGS_DECREPEAT, BUTTON_RC_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_STD_PREV, BUTTON_RC_REW, BUTTON_NONE }, - { ACTION_STD_PREVREPEAT, BUTTON_RC_REW|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_STD_NEXT, BUTTON_RC_FF, BUTTON_NONE }, - { ACTION_STD_NEXTREPEAT, BUTTON_RC_FF|BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_SETTINGS_INC, BUTTON_RC_FF, BUTTON_NONE }, + { ACTION_SETTINGS_INCREPEAT, BUTTON_RC_FF|BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_SETTINGS_DEC, BUTTON_RC_REW, BUTTON_NONE }, + { ACTION_SETTINGS_DECREPEAT, BUTTON_RC_REW|BUTTON_REPEAT,BUTTON_NONE }, + { ACTION_STD_CANCEL, BUTTON_RC_REC, BUTTON_NONE }, LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) }; /* remote_button_context_settings_r_is_inc */ @@ -275,10 +312,9 @@ static const struct button_mapping button_context_tree[] = { }; /* button_context_tree */ static const struct button_mapping remote_button_context_tree[] = { - { ACTION_STD_CANCEL, BUTTON_RC_VOL_DOWN, BUTTON_NONE }, - { ACTION_STD_OK, BUTTON_RC_VOL_UP, BUTTON_NONE }, - { ACTION_NONE, BUTTON_RC_MODE, BUTTON_NONE }, - { ACTION_TREE_WPS, BUTTON_RC_MODE|BUTTON_REL, BUTTON_RC_MODE }, + { ACTION_NONE, BUTTON_RC_PLAY, BUTTON_NONE }, + { ACTION_TREE_WPS, BUTTON_RC_PLAY|BUTTON_REL, BUTTON_RC_PLAY }, + { ACTION_TREE_STOP, BUTTON_RC_PLAY|BUTTON_REPEAT, BUTTON_RC_PLAY }, LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) }; /* remote_button_context_tree */ @@ -297,6 +333,20 @@ static const struct button_mapping button_context_tree_scroll_lr[] = { LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_TREE), }; /* button_context_tree_scroll_lr */ +static const struct button_mapping remote_button_context_tree_scroll_lr[] = { + { ACTION_NONE, BUTTON_RC_REW, BUTTON_NONE }, + { ACTION_STD_CANCEL, BUTTON_RC_REW|BUTTON_REL, BUTTON_RC_REW }, + { ACTION_TREE_ROOT_INIT, BUTTON_RC_REW|BUTTON_REPEAT, BUTTON_RC_REW }, + { ACTION_TREE_PGLEFT, BUTTON_RC_REW|BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_TREE_PGLEFT, BUTTON_RC_REW|BUTTON_REL, BUTTON_RC_REW|BUTTON_REPEAT }, + { ACTION_NONE, BUTTON_RC_FF, BUTTON_NONE }, + { ACTION_STD_OK, BUTTON_RC_FF|BUTTON_REL, BUTTON_RC_FF }, + { ACTION_TREE_PGRIGHT, BUTTON_RC_FF|BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_TREE_PGRIGHT, BUTTON_RC_FF|BUTTON_REL, BUTTON_RC_FF|BUTTON_REPEAT }, + + LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_TREE), +}; /* remote_button_context_tree_scroll_lr */ + /** While-Playing Screen (WPS) **/ static const struct button_mapping button_context_wps[] = { { ACTION_WPS_PLAY, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY }, @@ -341,7 +391,7 @@ static const struct button_mapping remote_button_context_wps[] = { { ACTION_WPS_MENU, BUTTON_RC_MENU|BUTTON_REL, BUTTON_RC_MENU }, { ACTION_WPS_QUICKSCREEN, BUTTON_RC_MENU|BUTTON_REPEAT, BUTTON_RC_MENU }, - LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) + LAST_ITEM_IN_LIST }; /* remote_button_context_wps */ /** Yes/No Screen **/ @@ -367,24 +417,38 @@ static const struct button_mapping* get_context_mapping_remote( int context ) return remote_button_context_standard; /* remote contexts with special mapping */ + case CONTEXT_BOOKMARKSCREEN: + return remote_button_context_bmark; + + case CONTEXT_FM: + return remote_button_context_radio; + case CONTEXT_KEYBOARD: return remote_button_context_keyboard; - case CONTEXT_MAINMENU: - return remote_button_context_mainmenu; - case CONTEXT_PITCHSCREEN: return remote_button_context_pitchscreen; case CONTEXT_QUICKSCREEN: return remote_button_context_quickscreen; + case CONTEXT_RECSCREEN: + return remote_button_context_recscreen; + + case CONTEXT_SETTINGS: + return remote_button_context_settings; + case CONTEXT_SETTINGS_COLOURCHOOSER: case CONTEXT_SETTINGS_EQ: case CONTEXT_SETTINGS_TIME: return remote_button_context_settings_r_is_inc; case CONTEXT_TREE: + case CONTEXT_MAINMENU: + if (global_settings.hold_lr_for_scroll_in_list) + return remote_button_context_tree_scroll_lr; + /* else fall through to CONTEXT_TREE|CONTEXT_CUSTOM */ + case CONTEXT_TREE|CONTEXT_CUSTOM: return remote_button_context_tree; case CONTEXT_WPS: