diff options
author | Dana Conrad <dconrad@fastmail.com> | 2021-09-05 11:27:33 -0500 |
---|---|---|
committer | Aidan MacDonald <amachronic@protonmail.com> | 2021-10-02 10:07:02 -0400 |
commit | d435bb77b57a2c3ec1f3e447101bb6bbb7d163e1 (patch) | |
tree | 347b91540fae3eca7401274274431e55724213a7 | |
parent | 95b10ac74e7a996b9b1ce7ce88c205e39b67502b (diff) | |
download | rockbox-d435bb77b57a2c3ec1f3e447101bb6bbb7d163e1.tar.gz rockbox-d435bb77b57a2c3ec1f3e447101bb6bbb7d163e1.zip |
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
-rw-r--r-- | apps/keymaps/keymap-hm60x.c | 2 | ||||
-rw-r--r-- | apps/keymaps/keymap-hm801.c | 2 | ||||
-rw-r--r-- | apps/keymaps/keymap-ihifi.c | 2 | ||||
-rw-r--r-- | apps/keymaps/keymap-m3.c | 4 | ||||
-rw-r--r-- | apps/keymaps/keymap-ma.c | 2 | ||||
-rw-r--r-- | apps/keymaps/keymap-mpio-hd200.c | 6 | ||||
-rw-r--r-- | apps/keymaps/keymap-mpio-hd300.c | 5 | ||||
-rw-r--r-- | apps/keymaps/keymap-sansa-connect.c | 7 | ||||
-rw-r--r-- | apps/keymaps/keymap-shanlingq1.c | 2 | ||||
-rw-r--r-- | apps/keymaps/keymap-vibe500.c | 4 | ||||
-rw-r--r-- | apps/keymaps/keymap-x5.c | 4 |
11 files changed, 26 insertions, 14 deletions
diff --git a/apps/keymaps/keymap-hm60x.c b/apps/keymaps/keymap-hm60x.c index 1050ec7f31..2e1f3dd516 100644 --- a/apps/keymaps/keymap-hm60x.c +++ b/apps/keymaps/keymap-hm60x.c | |||
@@ -176,7 +176,7 @@ static const struct button_mapping button_context_tree_scroll_lr[] = { | |||
176 | /** Yes/No Screen **/ | 176 | /** Yes/No Screen **/ |
177 | static const struct button_mapping button_context_yesnoscreen[] = { | 177 | static const struct button_mapping button_context_yesnoscreen[] = { |
178 | { ACTION_YESNO_ACCEPT, BUTTON_SELECT, BUTTON_NONE }, | 178 | { ACTION_YESNO_ACCEPT, BUTTON_SELECT, BUTTON_NONE }, |
179 | LAST_ITEM_IN_LIST | 179 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) |
180 | }; /* button_context_settings_yesnoscreen */ | 180 | }; /* button_context_settings_yesnoscreen */ |
181 | 181 | ||
182 | /* get_context_mapping returns a pointer to one of the above defined arrays depending on the context */ | 182 | /* get_context_mapping returns a pointer to one of the above defined arrays depending on the context */ |
diff --git a/apps/keymaps/keymap-hm801.c b/apps/keymaps/keymap-hm801.c index b69656a3f1..1f0a49c90c 100644 --- a/apps/keymaps/keymap-hm801.c +++ b/apps/keymaps/keymap-hm801.c | |||
@@ -202,7 +202,7 @@ static const struct button_mapping button_context_tree_scroll_lr[] = { | |||
202 | /** Yes/No Screen **/ | 202 | /** Yes/No Screen **/ |
203 | static const struct button_mapping button_context_yesnoscreen[] = { | 203 | static const struct button_mapping button_context_yesnoscreen[] = { |
204 | { ACTION_YESNO_ACCEPT, BUTTON_SELECT, BUTTON_NONE }, | 204 | { ACTION_YESNO_ACCEPT, BUTTON_SELECT, BUTTON_NONE }, |
205 | LAST_ITEM_IN_LIST | 205 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) |
206 | }; /* button_context_settings_yesnoscreen */ | 206 | }; /* button_context_settings_yesnoscreen */ |
207 | 207 | ||
208 | /* get_context_mapping returns a pointer to one of the above defined arrays depending on the context */ | 208 | /* get_context_mapping returns a pointer to one of the above defined arrays depending on the context */ |
diff --git a/apps/keymaps/keymap-ihifi.c b/apps/keymaps/keymap-ihifi.c index 0d574c19e6..147c2f5f62 100644 --- a/apps/keymaps/keymap-ihifi.c +++ b/apps/keymaps/keymap-ihifi.c | |||
@@ -175,7 +175,7 @@ static const struct button_mapping button_context_tree_scroll_lr[] = { | |||
175 | /** Yes/No Screen **/ | 175 | /** Yes/No Screen **/ |
176 | static const struct button_mapping button_context_yesnoscreen[] = { | 176 | static const struct button_mapping button_context_yesnoscreen[] = { |
177 | { ACTION_YESNO_ACCEPT, BUTTON_PLAY, BUTTON_NONE }, | 177 | { ACTION_YESNO_ACCEPT, BUTTON_PLAY, BUTTON_NONE }, |
178 | LAST_ITEM_IN_LIST | 178 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) |
179 | }; /* button_context_settings_yesnoscreen */ | 179 | }; /* button_context_settings_yesnoscreen */ |
180 | 180 | ||
181 | /* get_context_mapping returns a pointer to one of the above defined arrays depending on the context */ | 181 | /* get_context_mapping returns a pointer to one of the above defined arrays depending on the context */ |
diff --git a/apps/keymaps/keymap-m3.c b/apps/keymaps/keymap-m3.c index 6192d7ff6b..bcd96d664b 100644 --- a/apps/keymaps/keymap-m3.c +++ b/apps/keymaps/keymap-m3.c | |||
@@ -379,12 +379,12 @@ static const struct button_mapping remote_button_context_wps[] = { | |||
379 | /** Yes/No Screen **/ | 379 | /** Yes/No Screen **/ |
380 | static const struct button_mapping button_context_yesnoscreen[] = { | 380 | static const struct button_mapping button_context_yesnoscreen[] = { |
381 | { ACTION_YESNO_ACCEPT, BUTTON_PLAY, BUTTON_NONE }, | 381 | { ACTION_YESNO_ACCEPT, BUTTON_PLAY, BUTTON_NONE }, |
382 | LAST_ITEM_IN_LIST | 382 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) |
383 | }; /* button_context_yesnoscreen */ | 383 | }; /* button_context_yesnoscreen */ |
384 | 384 | ||
385 | static const struct button_mapping remote_button_context_yesnoscreen[] = { | 385 | static const struct button_mapping remote_button_context_yesnoscreen[] = { |
386 | { ACTION_YESNO_ACCEPT, BUTTON_RC_PLAY, BUTTON_NONE }, | 386 | { ACTION_YESNO_ACCEPT, BUTTON_RC_PLAY, BUTTON_NONE }, |
387 | LAST_ITEM_IN_LIST | 387 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) |
388 | }; /* remote_button_context_yesnoscreen */ | 388 | }; /* remote_button_context_yesnoscreen */ |
389 | 389 | ||
390 | 390 | ||
diff --git a/apps/keymaps/keymap-ma.c b/apps/keymaps/keymap-ma.c index e1740b697b..28220d9f50 100644 --- a/apps/keymaps/keymap-ma.c +++ b/apps/keymaps/keymap-ma.c | |||
@@ -183,7 +183,7 @@ static const struct button_mapping button_context_tree_scroll_lr[] = { | |||
183 | /** Yes/No Screen **/ | 183 | /** Yes/No Screen **/ |
184 | static const struct button_mapping button_context_yesnoscreen[] = { | 184 | static const struct button_mapping button_context_yesnoscreen[] = { |
185 | { ACTION_YESNO_ACCEPT, BUTTON_PLAY, BUTTON_NONE }, | 185 | { ACTION_YESNO_ACCEPT, BUTTON_PLAY, BUTTON_NONE }, |
186 | LAST_ITEM_IN_LIST | 186 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) |
187 | }; /* button_context_settings_yesnoscreen */ | 187 | }; /* button_context_settings_yesnoscreen */ |
188 | 188 | ||
189 | /* get_context_mapping returns a pointer to one of the above defined arrays depending on the context */ | 189 | /* get_context_mapping returns a pointer to one of the above defined arrays depending on the context */ |
diff --git a/apps/keymaps/keymap-mpio-hd200.c b/apps/keymaps/keymap-mpio-hd200.c index 71b3190384..019d4bfac4 100644 --- a/apps/keymaps/keymap-mpio-hd200.c +++ b/apps/keymaps/keymap-mpio-hd200.c | |||
@@ -105,8 +105,10 @@ static const struct button_mapping button_context_settings[] = { | |||
105 | static const struct button_mapping button_context_yesno[] = { | 105 | static const struct button_mapping button_context_yesno[] = { |
106 | { ACTION_YESNO_ACCEPT, BUTTON_FUNC, BUTTON_NONE }, | 106 | { ACTION_YESNO_ACCEPT, BUTTON_FUNC, BUTTON_NONE }, |
107 | { ACTION_YESNO_ACCEPT, BUTTON_PLAY, BUTTON_NONE }, | 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 | }; /* button_context_yesno */ | 112 | }; /* button_context_yesno */ |
111 | 113 | ||
112 | static const struct button_mapping button_context_bmark[] = { | 114 | static const struct button_mapping button_context_bmark[] = { |
@@ -269,7 +271,7 @@ static const struct button_mapping button_rc_context_yesno[] = { | |||
269 | { ACTION_YESNO_ACCEPT, BUTTON_RC_FUNC, BUTTON_NONE }, | 271 | { ACTION_YESNO_ACCEPT, BUTTON_RC_FUNC, BUTTON_NONE }, |
270 | { ACTION_YESNO_ACCEPT, BUTTON_RC_PLAY, BUTTON_NONE }, | 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 | }; /* button_context_yesno */ | 275 | }; /* button_context_yesno */ |
274 | 276 | ||
275 | static const struct button_mapping button_rc_context_radio[] = { | 277 | static const struct button_mapping button_rc_context_radio[] = { |
diff --git a/apps/keymaps/keymap-mpio-hd300.c b/apps/keymaps/keymap-mpio-hd300.c index cdb617bed0..7941d1704b 100644 --- a/apps/keymaps/keymap-mpio-hd300.c +++ b/apps/keymaps/keymap-mpio-hd300.c | |||
@@ -109,8 +109,11 @@ static const struct button_mapping button_context_settings[] = { | |||
109 | static const struct button_mapping button_context_yesno[] = { | 109 | static const struct button_mapping button_context_yesno[] = { |
110 | { ACTION_YESNO_ACCEPT, BUTTON_ENTER, BUTTON_NONE }, | 110 | { ACTION_YESNO_ACCEPT, BUTTON_ENTER, BUTTON_NONE }, |
111 | { ACTION_YESNO_ACCEPT, BUTTON_PLAY, BUTTON_NONE }, | 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 | }; /* button_context_yesno */ | 117 | }; /* button_context_yesno */ |
115 | 118 | ||
116 | static const struct button_mapping button_context_bmark[] = { | 119 | static const struct button_mapping button_context_bmark[] = { |
diff --git a/apps/keymaps/keymap-sansa-connect.c b/apps/keymaps/keymap-sansa-connect.c index 6a6d5de955..b339744b0f 100644 --- a/apps/keymaps/keymap-sansa-connect.c +++ b/apps/keymaps/keymap-sansa-connect.c | |||
@@ -70,7 +70,12 @@ static const struct button_mapping button_context_wps[] = { | |||
70 | 70 | ||
71 | static const struct button_mapping button_context_yesno[] = { | 71 | static const struct button_mapping button_context_yesno[] = { |
72 | {ACTION_YESNO_ACCEPT, BUTTON_SELECT, BUTTON_NONE}, | 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 | }; /* button_context_yesno */ | 79 | }; /* button_context_yesno */ |
75 | 80 | ||
76 | static const struct button_mapping button_context_settings_time[] = { | 81 | static const struct button_mapping button_context_settings_time[] = { |
diff --git a/apps/keymaps/keymap-shanlingq1.c b/apps/keymaps/keymap-shanlingq1.c index cb0e0a44ff..4caaa36fd2 100644 --- a/apps/keymaps/keymap-shanlingq1.c +++ b/apps/keymaps/keymap-shanlingq1.c | |||
@@ -64,7 +64,7 @@ static const struct button_mapping button_context_yesno[] = { | |||
64 | /* note: touchscreen buttons are usable in addition to physical keys */ | 64 | /* note: touchscreen buttons are usable in addition to physical keys */ |
65 | {ACTION_YESNO_ACCEPT, BUTTON_PLAY, BUTTON_NONE}, | 65 | {ACTION_YESNO_ACCEPT, BUTTON_PLAY, BUTTON_NONE}, |
66 | {ACTION_STD_CANCEL, BUTTON_POWER, BUTTON_NONE}, | 66 | {ACTION_STD_CANCEL, BUTTON_POWER, BUTTON_NONE}, |
67 | LAST_ITEM_IN_LIST | 67 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) |
68 | }; /* button_context_yesno */ | 68 | }; /* button_context_yesno */ |
69 | 69 | ||
70 | const struct button_mapping* target_get_context_mapping(int context) | 70 | const struct button_mapping* target_get_context_mapping(int context) |
diff --git a/apps/keymaps/keymap-vibe500.c b/apps/keymaps/keymap-vibe500.c index 49f77628ce..5116ec8575 100644 --- a/apps/keymaps/keymap-vibe500.c +++ b/apps/keymaps/keymap-vibe500.c | |||
@@ -113,7 +113,9 @@ static const struct button_mapping button_context_settings[] = { | |||
113 | 113 | ||
114 | static const struct button_mapping button_context_yesno[] = { | 114 | static const struct button_mapping button_context_yesno[] = { |
115 | { ACTION_YESNO_ACCEPT, BUTTON_OK, BUTTON_NONE }, | 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 | }; /* button_context_yesno */ | 119 | }; /* button_context_yesno */ |
118 | 120 | ||
119 | static const struct button_mapping button_context_bmark[] = { | 121 | static const struct button_mapping button_context_bmark[] = { |
diff --git a/apps/keymaps/keymap-x5.c b/apps/keymaps/keymap-x5.c index fb2fbfa605..249df7bf3c 100644 --- a/apps/keymaps/keymap-x5.c +++ b/apps/keymaps/keymap-x5.c | |||
@@ -405,12 +405,12 @@ static const struct button_mapping remote_button_context_wps[] = { | |||
405 | /** Yes/No Screen **/ | 405 | /** Yes/No Screen **/ |
406 | static const struct button_mapping button_context_yesnoscreen[] = { | 406 | static const struct button_mapping button_context_yesnoscreen[] = { |
407 | { ACTION_YESNO_ACCEPT, BUTTON_SELECT, BUTTON_NONE }, | 407 | { ACTION_YESNO_ACCEPT, BUTTON_SELECT, BUTTON_NONE }, |
408 | LAST_ITEM_IN_LIST | 408 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) |
409 | }; /* button_context_settings_yesnoscreen */ | 409 | }; /* button_context_settings_yesnoscreen */ |
410 | 410 | ||
411 | static const struct button_mapping remote_button_context_yesnoscreen[] = { | 411 | static const struct button_mapping remote_button_context_yesnoscreen[] = { |
412 | { ACTION_YESNO_ACCEPT, BUTTON_RC_PLAY, BUTTON_NONE }, | 412 | { ACTION_YESNO_ACCEPT, BUTTON_RC_PLAY, BUTTON_NONE }, |
413 | LAST_ITEM_IN_LIST | 413 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) |
414 | }; /* remote_button_context_settings_yesnoscreen */ | 414 | }; /* remote_button_context_settings_yesnoscreen */ |
415 | 415 | ||
416 | 416 | ||