diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2021-03-13 22:16:12 -0500 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2021-03-13 22:17:26 -0500 |
commit | 714f7a21da43a9e1f3d3467c54df7616da4c680c (patch) | |
tree | ad9b76e1320640468d57beb4f59189fa1730b99f | |
parent | b44dd11b6b3104dfaf0724125452c13789f76119 (diff) | |
download | rockbox-714f7a21da43a9e1f3d3467c54df7616da4c680c.tar.gz rockbox-714f7a21da43a9e1f3d3467c54df7616da4c680c.zip |
erosq: Have tree context fall back to list context rather than mainmenu.
Allows 'back' to cancel vs always popping into wps, for example.
Change-Id: Ia9f27f884c6076906ff023d666872c566c60aa37
-rw-r--r-- | apps/keymaps/keymap-erosq.c | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/apps/keymaps/keymap-erosq.c b/apps/keymaps/keymap-erosq.c index e056cbb508..944e5e4ec0 100644 --- a/apps/keymaps/keymap-erosq.c +++ b/apps/keymaps/keymap-erosq.c | |||
@@ -32,7 +32,7 @@ | |||
32 | * Insert LAST_ITEM_IN_LIST at the end of each mapping | 32 | * Insert LAST_ITEM_IN_LIST at the end of each mapping |
33 | */ | 33 | */ |
34 | static const struct button_mapping button_context_standard[] = { | 34 | static const struct button_mapping button_context_standard[] = { |
35 | { ACTION_STD_PREV, BUTTON_SCROLL_BACK, BUTTON_NONE }, | 35 | { ACTION_STD_PREV, BUTTON_SCROLL_BACK, BUTTON_NONE }, |
36 | { ACTION_STD_PREV, BUTTON_PREV, BUTTON_NONE }, | 36 | { ACTION_STD_PREV, BUTTON_PREV, BUTTON_NONE }, |
37 | { ACTION_STD_PREVREPEAT, BUTTON_PREV|BUTTON_REPEAT, BUTTON_NONE }, | 37 | { ACTION_STD_PREVREPEAT, BUTTON_PREV|BUTTON_REPEAT, BUTTON_NONE }, |
38 | { ACTION_STD_NEXT, BUTTON_SCROLL_FWD, BUTTON_NONE }, | 38 | { ACTION_STD_NEXT, BUTTON_SCROLL_FWD, BUTTON_NONE }, |
@@ -81,7 +81,6 @@ static const struct button_mapping button_context_wps[] = { | |||
81 | * ACTION_WPS_LIST_BOOKMARKS, optional | 81 | * ACTION_WPS_LIST_BOOKMARKS, optional |
82 | * ACTION_WPS_CREATE_BOOKMARK, optional | 82 | * ACTION_WPS_CREATE_BOOKMARK, optional |
83 | */ | 83 | */ |
84 | |||
85 | { ACTION_STD_KEYLOCK, BUTTON_POWER, BUTTON_NONE }, | 84 | { ACTION_STD_KEYLOCK, BUTTON_POWER, BUTTON_NONE }, |
86 | 85 | ||
87 | LAST_ITEM_IN_LIST | 86 | LAST_ITEM_IN_LIST |
@@ -114,22 +113,16 @@ static const struct button_mapping button_context_list[] = { | |||
114 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) | 113 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) |
115 | }; /* button_context_list */ | 114 | }; /* button_context_list */ |
116 | 115 | ||
117 | #if 0 // XXX? | ||
118 | static const struct button_mapping button_context_tree[] = { | 116 | static const struct button_mapping button_context_tree[] = { |
119 | /* ACTION_TREE_ROOT_INIT, | 117 | /* |
120 | * ACTION_TREE_PGLEFT, optional | 118 | { ACTION_TREE_WPS, BUTTON_OPTION|BUTTON_REL, BUTTON_OPTION }, |
121 | * ACTION_TREE_PGRIGHT, optional | 119 | { ACTION_TREE_STOP, BUTTON_POWER|BUTTON_REL, BUTTON_POWER }, |
122 | * ACTION_TREE_STOP, | 120 | { ACTION_TREE_HOTKEY, BUTTON_HOME|BUTTON_REPEAT, BUTTON_HOME }, |
123 | * ACTION_TREE_WPS, | 121 | */ |
124 | * ACTION_TREE_HOTKEY, | 122 | { ACTION_STD_MENU, BUTTON_MENU, BUTTON_MENU }, |
125 | */ | 123 | |
126 | /* { ACTION_TREE_WPS, BUTTON_UP|BUTTON_REL, BUTTON_UP }, | ||
127 | * { ACTION_TREE_STOP, BUTTON_POWER|BUTTON_REL, BUTTON_POWER }, | ||
128 | * { ACTION_TREE_HOTKEY, BUTTON_REC|BUTTON_REL, BUTTON_REC }, | ||
129 | */ | ||
130 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST), | 124 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST), |
131 | }; /* button_context_tree */ | 125 | }; /* button_context_tree */ |
132 | #endif | ||
133 | 126 | ||
134 | static const struct button_mapping button_context_yesno[] = { | 127 | static const struct button_mapping button_context_yesno[] = { |
135 | { ACTION_YESNO_ACCEPT, BUTTON_PLAY, BUTTON_NONE }, | 128 | { ACTION_YESNO_ACCEPT, BUTTON_PLAY, BUTTON_NONE }, |
@@ -223,7 +216,10 @@ const struct button_mapping* get_context_mapping(int context) | |||
223 | 216 | ||
224 | case CONTEXT_MAINMENU: | 217 | case CONTEXT_MAINMENU: |
225 | return button_context_mainmenu; | 218 | return button_context_mainmenu; |
219 | |||
226 | case CONTEXT_TREE: | 220 | case CONTEXT_TREE: |
221 | return button_context_tree; | ||
222 | |||
227 | case CONTEXT_LIST: | 223 | case CONTEXT_LIST: |
228 | return button_context_list; | 224 | return button_context_list; |
229 | 225 | ||