diff options
author | Marcin Bukat <marcin.bukat@gmail.com> | 2018-12-06 15:15:26 +0100 |
---|---|---|
committer | Marcin Bukat <marcin.bukat@gmail.com> | 2018-12-06 15:15:26 +0100 |
commit | 4e8ef17a8b756c8894ec4d8b2481794f7f69c361 (patch) | |
tree | 8db185cd1bc38f619e9cc2a0c6be1d38169d7cd2 | |
parent | b552a3720525652d01fe94e214d4fb195acab50a (diff) | |
download | rockbox-4e8ef17a8b756c8894ec4d8b2481794f7f69c361.tar.gz rockbox-4e8ef17a8b756c8894ec4d8b2481794f7f69c361.zip |
More keymap refinements
Change-Id: If3ae6ece7848b143088d5f9ec8c00ed593d59ed2
-rw-r--r-- | apps/keymaps/keymap-agptekrocker.c | 41 | ||||
-rw-r--r-- | firmware/export/config/agptekrocker.h | 3 |
2 files changed, 24 insertions, 20 deletions
diff --git a/apps/keymaps/keymap-agptekrocker.c b/apps/keymaps/keymap-agptekrocker.c index c74a0b8d00..d1fa0170e6 100644 --- a/apps/keymaps/keymap-agptekrocker.c +++ b/apps/keymaps/keymap-agptekrocker.c | |||
@@ -97,18 +97,19 @@ static const struct button_mapping button_context_settings[] = { | |||
97 | 97 | ||
98 | static const struct button_mapping button_context_list[] = { | 98 | static const struct button_mapping button_context_list[] = { |
99 | /* ACTION_LISTTREE_PGUP, optional | 99 | /* ACTION_LISTTREE_PGUP, optional |
100 | * ACTION_LISTTREE_PGDOWN,optional | 100 | * ACTION_LISTTREE_PGDOWN, optional |
101 | */ | 101 | */ |
102 | 102 | ||
103 | #ifdef HAVE_VOLUME_IN_LIST | 103 | #ifdef HAVE_VOLUME_IN_LIST |
104 | { ACTION_LIST_VOLUP, BUTTON_VOL_UP, BUTTON_NONE }, | 104 | { ACTION_LIST_VOLUP, BUTTON_VOLUP, BUTTON_NONE }, |
105 | { ACTION_LIST_VOLUP, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE }, | 105 | { ACTION_LIST_VOLUP, BUTTON_VOLUP|BUTTON_REPEAT, BUTTON_NONE }, |
106 | { ACTION_LIST_VOLDOWN, BUTTON_VOL_DOWN, BUTTON_NONE }, | 106 | { ACTION_LIST_VOLDOWN, BUTTON_VOLDOWN, BUTTON_NONE }, |
107 | { ACTION_LIST_VOLDOWN, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE }, | 107 | { ACTION_LIST_VOLDOWN, BUTTON_VOLDOWN|BUTTON_REPEAT, BUTTON_NONE }, |
108 | #endif | 108 | #endif |
109 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) | 109 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) |
110 | }; /* button_context_list */ | 110 | }; /* button_context_list */ |
111 | 111 | ||
112 | #if 0 | ||
112 | static const struct button_mapping button_context_tree[] = { | 113 | static const struct button_mapping button_context_tree[] = { |
113 | /* ACTION_TREE_ROOT_INIT, | 114 | /* ACTION_TREE_ROOT_INIT, |
114 | * ACTION_TREE_PGLEFT, optional | 115 | * ACTION_TREE_PGLEFT, optional |
@@ -117,12 +118,13 @@ static const struct button_mapping button_context_tree[] = { | |||
117 | * ACTION_TREE_WPS, | 118 | * ACTION_TREE_WPS, |
118 | * ACTION_TREE_HOTKEY, | 119 | * ACTION_TREE_HOTKEY, |
119 | */ | 120 | */ |
120 | { ACTION_TREE_WPS, BUTTON_UP|BUTTON_REL, BUTTON_UP }, | 121 | /* { ACTION_TREE_WPS, BUTTON_UP|BUTTON_REL, BUTTON_UP }, |
121 | /* { ACTION_TREE_STOP, BUTTON_POWER|BUTTON_REL, BUTTON_POWER }, | 122 | * { ACTION_TREE_STOP, BUTTON_POWER|BUTTON_REL, BUTTON_POWER }, |
122 | * { ACTION_TREE_HOTKEY, BUTTON_REC|BUTTON_REL, BUTTON_REC }, | 123 | * { ACTION_TREE_HOTKEY, BUTTON_REC|BUTTON_REL, BUTTON_REC }, |
123 | */ | 124 | */ |
124 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST), | 125 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST), |
125 | }; /* button_context_tree */ | 126 | }; /* button_context_tree */ |
127 | #endif | ||
126 | 128 | ||
127 | static const struct button_mapping button_context_yesno[] = { | 129 | static const struct button_mapping button_context_yesno[] = { |
128 | { ACTION_YESNO_ACCEPT, BUTTON_SELECT, BUTTON_NONE }, | 130 | { ACTION_YESNO_ACCEPT, BUTTON_SELECT, BUTTON_NONE }, |
@@ -139,8 +141,9 @@ static const struct button_mapping button_context_quickscreen[] = { | |||
139 | { ACTION_QS_LEFT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, | 141 | { ACTION_QS_LEFT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, |
140 | { ACTION_QS_RIGHT, BUTTON_RIGHT|BUTTON_REL, BUTTON_NONE }, | 142 | { ACTION_QS_RIGHT, BUTTON_RIGHT|BUTTON_REL, BUTTON_NONE }, |
141 | { ACTION_QS_RIGHT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, | 143 | { ACTION_QS_RIGHT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, |
142 | 144 | { ACTION_STD_CANCEL, BUTTON_SELECT, BUTTON_NONE }, | |
143 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD), | 145 | |
146 | LAST_ITEM_IN_LIST | ||
144 | }; /* button_context_quickscreen */ | 147 | }; /* button_context_quickscreen */ |
145 | 148 | ||
146 | static const struct button_mapping button_context_settings_time[] = { | 149 | static const struct button_mapping button_context_settings_time[] = { |
@@ -160,18 +163,17 @@ static const struct button_mapping button_context_settings_time[] = { | |||
160 | }; /* button_context_settings_time */ | 163 | }; /* button_context_settings_time */ |
161 | 164 | ||
162 | static const struct button_mapping button_context_pitchscreen[] = { | 165 | static const struct button_mapping button_context_pitchscreen[] = { |
163 | { ACTION_PS_INC_SMALL, BUTTON_VOLUP, BUTTON_NONE }, | 166 | { ACTION_PS_INC_SMALL, BUTTON_UP, BUTTON_NONE }, |
164 | { ACTION_PS_INC_BIG, BUTTON_VOLUP|BUTTON_REPEAT, BUTTON_NONE }, | 167 | { ACTION_PS_INC_BIG, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE }, |
165 | { ACTION_PS_DEC_SMALL, BUTTON_VOLDOWN, BUTTON_NONE }, | 168 | { ACTION_PS_DEC_SMALL, BUTTON_DOWN, BUTTON_NONE }, |
166 | { ACTION_PS_DEC_BIG, BUTTON_VOLDOWN|BUTTON_REPEAT, BUTTON_NONE }, | 169 | { ACTION_PS_DEC_BIG, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE }, |
167 | { ACTION_PS_NUDGE_LEFT, BUTTON_LEFT, BUTTON_NONE }, | 170 | { ACTION_PS_NUDGE_LEFT, BUTTON_LEFT, BUTTON_NONE }, |
168 | { ACTION_PS_NUDGE_LEFTOFF, BUTTON_LEFT|BUTTON_REL, BUTTON_NONE }, | 171 | /* { ACTION_PS_NUDGE_LEFTOFF, BUTTON_LEFT|BUTTON_REL, BUTTON_NONE }, */ |
169 | { ACTION_PS_NUDGE_RIGHT, BUTTON_RIGHT, BUTTON_NONE }, | 172 | { ACTION_PS_NUDGE_RIGHT, BUTTON_RIGHT, BUTTON_NONE }, |
170 | { ACTION_PS_NUDGE_RIGHTOFF, BUTTON_RIGHT|BUTTON_REL, BUTTON_NONE }, | 173 | /* { ACTION_PS_NUDGE_RIGHTOFF, BUTTON_RIGHT|BUTTON_REL, BUTTON_NONE }, */ |
171 | { ACTION_PS_TOGGLE_MODE, BUTTON_UP, BUTTON_NONE }, | 174 | { ACTION_PS_TOGGLE_MODE, BUTTON_SELECT|BUTTON_REL, BUTTON_SELECT }, |
172 | { ACTION_PS_RESET, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_SELECT }, | 175 | { ACTION_PS_RESET, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_SELECT }, |
173 | { ACTION_PS_EXIT, BUTTON_POWER, BUTTON_NONE }, | 176 | { ACTION_PS_EXIT, BUTTON_POWER, BUTTON_NONE }, |
174 | { ACTION_PS_EXIT, BUTTON_SELECT|BUTTON_REL, BUTTON_SELECT }, | ||
175 | { ACTION_PS_SLOWER, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, | 177 | { ACTION_PS_SLOWER, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, |
176 | { ACTION_PS_FASTER, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, | 178 | { ACTION_PS_FASTER, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, |
177 | 179 | ||
@@ -220,12 +222,11 @@ const struct button_mapping* get_context_mapping(int context) | |||
220 | case CONTEXT_WPS: | 222 | case CONTEXT_WPS: |
221 | return button_context_wps; | 223 | return button_context_wps; |
222 | 224 | ||
225 | case CONTEXT_MAINMENU: | ||
226 | case CONTEXT_TREE: | ||
223 | case CONTEXT_LIST: | 227 | case CONTEXT_LIST: |
224 | return button_context_list; | 228 | return button_context_list; |
225 | 229 | ||
226 | case CONTEXT_CUSTOM|CONTEXT_TREE: | ||
227 | return button_context_tree; | ||
228 | |||
229 | case CONTEXT_SETTINGS: | 230 | case CONTEXT_SETTINGS: |
230 | case CONTEXT_SETTINGS_EQ: | 231 | case CONTEXT_SETTINGS_EQ: |
231 | return button_context_settings; | 232 | return button_context_settings; |
diff --git a/firmware/export/config/agptekrocker.h b/firmware/export/config/agptekrocker.h index 74742bd56a..172e079721 100644 --- a/firmware/export/config/agptekrocker.h +++ b/firmware/export/config/agptekrocker.h | |||
@@ -40,6 +40,9 @@ | |||
40 | /* define this if you have access to the quickscreen */ | 40 | /* define this if you have access to the quickscreen */ |
41 | #define HAVE_QUICKSCREEN | 41 | #define HAVE_QUICKSCREEN |
42 | 42 | ||
43 | /* define this if the target has volume keys which can be used in the lists */ | ||
44 | #define HAVE_VOLUME_IN_LIST | ||
45 | |||
43 | /* define this if you would like tagcache to build on this target */ | 46 | /* define this if you would like tagcache to build on this target */ |
44 | #define HAVE_TAGCACHE | 47 | #define HAVE_TAGCACHE |
45 | 48 | ||