A modern Music Player Daemon based on Rockbox open source high quality audio player
libadwaita audio rust zig deno mpris rockbox mpd

Yes/No Screen Keymap: add fallbacks to targets lacking them

With the addition of ignoring unknown actions to the yes/no
screen, several (mostly older) targets won't have keys defined
to cancel out of the yes/no screen.

Adding fallbacks to standard context to correct this.

Targets:
Shanling Q1 - changed, untested (doesn't appear sim has buttons mapped)
Sansa Connect - changed, untested (can't figure out sim keys)

HM60x - changed, untested (sim won't build)
HM801 - changed, untested (sim won't build)
ihifi - changed, untested (sim won't build)
MA - changed, untested (sim won't build)

M3 - changed, tested on sim
X5 - changed, tested on sim
MPIO HD300 - changed, sim tested
MPIO HD200 - changed, sim tested (remote not tested)
Vibe 500 - changed, sim tested

Change-Id: Ib5290ada8e12bb845d3840e481e8533515b42e95

authored by

Dana Conrad and committed by
Aidan MacDonald
d435bb77 95b10ac7

+26 -14
+1 -1
apps/keymaps/keymap-hm60x.c
··· 176 176 /** Yes/No Screen **/ 177 177 static const struct button_mapping button_context_yesnoscreen[] = { 178 178 { ACTION_YESNO_ACCEPT, BUTTON_SELECT, BUTTON_NONE }, 179 - LAST_ITEM_IN_LIST 179 + LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) 180 180 }; /* button_context_settings_yesnoscreen */ 181 181 182 182 /* get_context_mapping returns a pointer to one of the above defined arrays depending on the context */
+1 -1
apps/keymaps/keymap-hm801.c
··· 202 202 /** Yes/No Screen **/ 203 203 static const struct button_mapping button_context_yesnoscreen[] = { 204 204 { ACTION_YESNO_ACCEPT, BUTTON_SELECT, BUTTON_NONE }, 205 - LAST_ITEM_IN_LIST 205 + LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) 206 206 }; /* button_context_settings_yesnoscreen */ 207 207 208 208 /* get_context_mapping returns a pointer to one of the above defined arrays depending on the context */
+1 -1
apps/keymaps/keymap-ihifi.c
··· 175 175 /** Yes/No Screen **/ 176 176 static const struct button_mapping button_context_yesnoscreen[] = { 177 177 { ACTION_YESNO_ACCEPT, BUTTON_PLAY, BUTTON_NONE }, 178 - LAST_ITEM_IN_LIST 178 + LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) 179 179 }; /* button_context_settings_yesnoscreen */ 180 180 181 181 /* get_context_mapping returns a pointer to one of the above defined arrays depending on the context */
+2 -2
apps/keymaps/keymap-m3.c
··· 379 379 /** Yes/No Screen **/ 380 380 static const struct button_mapping button_context_yesnoscreen[] = { 381 381 { ACTION_YESNO_ACCEPT, BUTTON_PLAY, BUTTON_NONE }, 382 - LAST_ITEM_IN_LIST 382 + LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) 383 383 }; /* button_context_yesnoscreen */ 384 384 385 385 static const struct button_mapping remote_button_context_yesnoscreen[] = { 386 386 { ACTION_YESNO_ACCEPT, BUTTON_RC_PLAY, BUTTON_NONE }, 387 - LAST_ITEM_IN_LIST 387 + LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) 388 388 }; /* remote_button_context_yesnoscreen */ 389 389 390 390
+1 -1
apps/keymaps/keymap-ma.c
··· 183 183 /** Yes/No Screen **/ 184 184 static const struct button_mapping button_context_yesnoscreen[] = { 185 185 { ACTION_YESNO_ACCEPT, BUTTON_PLAY, BUTTON_NONE }, 186 - LAST_ITEM_IN_LIST 186 + LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) 187 187 }; /* button_context_settings_yesnoscreen */ 188 188 189 189 /* get_context_mapping returns a pointer to one of the above defined arrays depending on the context */
+4 -2
apps/keymaps/keymap-mpio-hd200.c
··· 105 105 static const struct button_mapping button_context_yesno[] = { 106 106 { ACTION_YESNO_ACCEPT, BUTTON_FUNC, BUTTON_NONE }, 107 107 { ACTION_YESNO_ACCEPT, BUTTON_PLAY, BUTTON_NONE }, 108 + { ACTION_STD_CANCEL, BUTTON_VOL_UP, BUTTON_NONE }, 109 + { ACTION_STD_CANCEL, BUTTON_VOL_DOWN, BUTTON_NONE }, 108 110 109 - LAST_ITEM_IN_LIST 111 + LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) 110 112 }; /* button_context_yesno */ 111 113 112 114 static const struct button_mapping button_context_bmark[] = { ··· 269 271 { ACTION_YESNO_ACCEPT, BUTTON_RC_FUNC, BUTTON_NONE }, 270 272 { ACTION_YESNO_ACCEPT, BUTTON_RC_PLAY, BUTTON_NONE }, 271 273 272 - LAST_ITEM_IN_LIST 274 + LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) 273 275 }; /* button_context_yesno */ 274 276 275 277 static const struct button_mapping button_rc_context_radio[] = {
+4 -1
apps/keymaps/keymap-mpio-hd300.c
··· 109 109 static const struct button_mapping button_context_yesno[] = { 110 110 { ACTION_YESNO_ACCEPT, BUTTON_ENTER, BUTTON_NONE }, 111 111 { ACTION_YESNO_ACCEPT, BUTTON_PLAY, BUTTON_NONE }, 112 + { ACTION_STD_CANCEL, BUTTON_REW, BUTTON_NONE }, 113 + { ACTION_STD_CANCEL, BUTTON_FF, BUTTON_NONE }, 114 + { ACTION_STD_CANCEL, BUTTON_REC, BUTTON_NONE }, 112 115 113 - LAST_ITEM_IN_LIST 116 + LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) 114 117 }; /* button_context_yesno */ 115 118 116 119 static const struct button_mapping button_context_bmark[] = {
+6 -1
apps/keymaps/keymap-sansa-connect.c
··· 70 70 71 71 static const struct button_mapping button_context_yesno[] = { 72 72 {ACTION_YESNO_ACCEPT, BUTTON_SELECT, BUTTON_NONE}, 73 - LAST_ITEM_IN_LIST 73 + {ACTION_STD_CANCEL, BUTTON_PREV, BUTTON_NONE}, 74 + {ACTION_STD_CANCEL, BUTTON_NEXT, BUTTON_NONE}, 75 + {ACTION_STD_CANCEL, BUTTON_VOL_UP, BUTTON_NONE}, 76 + {ACTION_STD_CANCEL, BUTTON_VOL_DOWN, BUTTON_NONE}, 77 + {ACTION_STD_CANCEL, BUTTON_POWER, BUTTON_NONE}, 78 + LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) 74 79 }; /* button_context_yesno */ 75 80 76 81 static const struct button_mapping button_context_settings_time[] = {
+1 -1
apps/keymaps/keymap-shanlingq1.c
··· 64 64 /* note: touchscreen buttons are usable in addition to physical keys */ 65 65 {ACTION_YESNO_ACCEPT, BUTTON_PLAY, BUTTON_NONE}, 66 66 {ACTION_STD_CANCEL, BUTTON_POWER, BUTTON_NONE}, 67 - LAST_ITEM_IN_LIST 67 + LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) 68 68 }; /* button_context_yesno */ 69 69 70 70 const struct button_mapping* target_get_context_mapping(int context)
+3 -1
apps/keymaps/keymap-vibe500.c
··· 113 113 114 114 static const struct button_mapping button_context_yesno[] = { 115 115 { ACTION_YESNO_ACCEPT, BUTTON_OK, BUTTON_NONE }, 116 - LAST_ITEM_IN_LIST 116 + { ACTION_STD_CANCEL, BUTTON_PLAY, BUTTON_NONE }, 117 + { ACTION_STD_CANCEL, BUTTON_REC, BUTTON_NONE }, 118 + LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) 117 119 }; /* button_context_yesno */ 118 120 119 121 static const struct button_mapping button_context_bmark[] = {
+2 -2
apps/keymaps/keymap-x5.c
··· 405 405 /** Yes/No Screen **/ 406 406 static const struct button_mapping button_context_yesnoscreen[] = { 407 407 { ACTION_YESNO_ACCEPT, BUTTON_SELECT, BUTTON_NONE }, 408 - LAST_ITEM_IN_LIST 408 + LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) 409 409 }; /* button_context_settings_yesnoscreen */ 410 410 411 411 static const struct button_mapping remote_button_context_yesnoscreen[] = { 412 412 { ACTION_YESNO_ACCEPT, BUTTON_RC_PLAY, BUTTON_NONE }, 413 - LAST_ITEM_IN_LIST 413 + LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) 414 414 }; /* remote_button_context_settings_yesnoscreen */ 415 415 416 416