diff options
author | Marcin Bukat <marcin.bukat@gmail.com> | 2010-07-02 11:49:55 +0000 |
---|---|---|
committer | Marcin Bukat <marcin.bukat@gmail.com> | 2010-07-02 11:49:55 +0000 |
commit | 91ed5bd69585c9497c86ddebc89ac05886d0777b (patch) | |
tree | d7b040b2cfef059835d8b9cd1bdfb0d6401eff9c | |
parent | 426f4c1e87aea5f796d2b4ce71d9f1351f189c47 (diff) | |
download | rockbox-91ed5bd69585c9497c86ddebc89ac05886d0777b.tar.gz rockbox-91ed5bd69585c9497c86ddebc89ac05886d0777b.zip |
HD200 - rework keymap
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27241 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/keymaps/keymap-mpio-hd200.c | 244 |
1 files changed, 151 insertions, 93 deletions
diff --git a/apps/keymaps/keymap-mpio-hd200.c b/apps/keymaps/keymap-mpio-hd200.c index 77305c08f7..58a95046b4 100644 --- a/apps/keymaps/keymap-mpio-hd200.c +++ b/apps/keymaps/keymap-mpio-hd200.c | |||
@@ -38,136 +38,165 @@ CONTEXT_CUSTOM|CONTEXT_TREE = the standard list/tree defines (without directions | |||
38 | */ | 38 | */ |
39 | 39 | ||
40 | static const struct button_mapping button_context_standard[] = { | 40 | static const struct button_mapping button_context_standard[] = { |
41 | { ACTION_STD_PREV, BUTTON_PREV, BUTTON_NONE }, | 41 | { ACTION_STD_PREV, BUTTON_PREV, BUTTON_NONE }, |
42 | { ACTION_STD_PREVREPEAT, BUTTON_PREV|BUTTON_REPEAT, BUTTON_NONE }, | 42 | { ACTION_STD_PREVREPEAT, BUTTON_PREV|BUTTON_REPEAT, BUTTON_NONE }, |
43 | { ACTION_STD_NEXT, BUTTON_NEXT, BUTTON_NONE }, | 43 | { ACTION_STD_NEXT, BUTTON_NEXT, BUTTON_NONE }, |
44 | { ACTION_STD_NEXTREPEAT, BUTTON_NEXT|BUTTON_REPEAT, BUTTON_NONE }, | 44 | { ACTION_STD_NEXTREPEAT, BUTTON_NEXT|BUTTON_REPEAT, BUTTON_NONE }, |
45 | { ACTION_STD_CANCEL, BUTTON_REC|BUTTON_REL, BUTTON_REC }, | 45 | { ACTION_STD_OK, BUTTON_SELECT|BUTTON_REL, BUTTON_SELECT }, |
46 | { ACTION_STD_OK, BUTTON_SELECT|BUTTON_REL, BUTTON_SELECT }, | 46 | { ACTION_STD_CANCEL, BUTTON_REC|BUTTON_REL, BUTTON_REC }, |
47 | { ACTION_STD_MENU, BUTTON_REC|BUTTON_REPEAT, BUTTON_REC }, | 47 | { ACTION_STD_CONTEXT, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_SELECT }, |
48 | { ACTION_STD_QUICKSCREEN, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_PLAY }, | 48 | { ACTION_STD_MENU, BUTTON_REC|BUTTON_REPEAT, BUTTON_REC }, |
49 | { ACTION_STD_CONTEXT, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_SELECT }, | 49 | /* { ACTION_STD_QUICKSCREEN, BUTTON_, BUTTON_ }, */ |
50 | 50 | /* { ACTION_STD_KEYLOCK, BUTTON_, BUTTON_ }, */ | |
51 | /* { ACTION_STD_REC, BUTTON_, BUTTON_ }, */ | ||
52 | /* { ACTION_STD_HOTKEY, BUTTON_, BUTTON_ }, */ | ||
53 | /* { ACTION_F3, BUTTON_, BUTTON_ }, */ | ||
54 | |||
51 | LAST_ITEM_IN_LIST | 55 | LAST_ITEM_IN_LIST |
52 | }; /* button_context_standard */ | 56 | }; /* button_context_standard */ |
53 | 57 | ||
54 | static const struct button_mapping button_context_tree[] = { | 58 | static const struct button_mapping button_context_tree[] = { |
55 | { ACTION_TREE_WPS, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY }, | 59 | /* { ACTION_TREE_ROOT_INIT, BUTTON_, BUTTON_ }, */ |
56 | { ACTION_TREE_STOP, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_PLAY }, | 60 | /* { ACTION_TREE_PGLEFT, BUTTON_, BUTTON_ }, */ |
61 | /* { ACTION_TREE_PGRIGHT, BUTTON_, BUTTON_ }, */ | ||
62 | { ACTION_TREE_STOP, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_PLAY }, | ||
63 | { ACTION_TREE_WPS, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY }, | ||
64 | /* { ACTION_TREE_HOTKEY, BUTTON_, BUTTON_ }, */ | ||
57 | 65 | ||
58 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) | 66 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) |
59 | }; /* button_context_tree */ | 67 | }; /* button_context_tree */ |
60 | 68 | ||
61 | static const struct button_mapping button_context_tree_scroll_lr[] = { | ||
62 | { ACTION_NONE, BUTTON_PREV, BUTTON_NONE }, | ||
63 | { ACTION_STD_CANCEL, BUTTON_PREV|BUTTON_REL, BUTTON_PREV }, | ||
64 | { ACTION_TREE_ROOT_INIT, BUTTON_PREV|BUTTON_REPEAT, BUTTON_PREV }, | ||
65 | { ACTION_TREE_PGLEFT, BUTTON_PREV|BUTTON_REPEAT, BUTTON_NONE }, | ||
66 | { ACTION_TREE_PGLEFT, BUTTON_PREV|BUTTON_REL, BUTTON_PREV|BUTTON_REPEAT }, | ||
67 | { ACTION_NONE, BUTTON_NEXT, BUTTON_NONE }, | ||
68 | { ACTION_STD_OK, BUTTON_NEXT|BUTTON_REL, BUTTON_NEXT }, | ||
69 | { ACTION_TREE_PGRIGHT, BUTTON_NEXT|BUTTON_REPEAT, BUTTON_NONE }, | ||
70 | { ACTION_TREE_PGRIGHT, BUTTON_NEXT|BUTTON_REL, BUTTON_NEXT|BUTTON_REPEAT }, | ||
71 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_TREE), | ||
72 | }; /* button_context_tree_scroll_lr */ | ||
73 | |||
74 | static const struct button_mapping button_context_wps[] = { | 69 | static const struct button_mapping button_context_wps[] = { |
75 | { ACTION_WPS_PLAY, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY }, | 70 | { ACTION_WPS_BROWSE, BUTTON_SELECT|BUTTON_REL, BUTTON_SELECT }, |
76 | { ACTION_WPS_STOP, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_PLAY }, | 71 | { ACTION_WPS_PLAY, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY }, |
77 | { ACTION_WPS_SKIPPREV, BUTTON_PREV|BUTTON_REL, BUTTON_PREV }, | 72 | { ACTION_WPS_SEEKBACK, BUTTON_PREV|BUTTON_REPEAT, BUTTON_NONE }, |
78 | { ACTION_WPS_SEEKBACK, BUTTON_PREV|BUTTON_REPEAT, BUTTON_NONE }, | 73 | { ACTION_WPS_SEEKFWD, BUTTON_NEXT|BUTTON_REPEAT, BUTTON_NONE }, |
79 | { ACTION_WPS_STOPSEEK, BUTTON_PREV|BUTTON_REL, BUTTON_PREV|BUTTON_REPEAT }, | 74 | { ACTION_WPS_STOPSEEK, BUTTON_PREV|BUTTON_REL, BUTTON_PREV|BUTTON_REPEAT }, |
80 | { ACTION_WPS_SKIPNEXT, BUTTON_NEXT|BUTTON_REL, BUTTON_NEXT }, | 75 | { ACTION_WPS_STOPSEEK, BUTTON_NEXT|BUTTON_REL, BUTTON_NEXT|BUTTON_REPEAT }, |
81 | { ACTION_WPS_SEEKFWD, BUTTON_NEXT|BUTTON_REPEAT, BUTTON_NONE }, | 76 | { ACTION_WPS_SKIPNEXT, BUTTON_NEXT|BUTTON_REL, BUTTON_NEXT }, |
82 | { ACTION_WPS_STOPSEEK, BUTTON_NEXT|BUTTON_REL, BUTTON_NEXT|BUTTON_REPEAT }, | 77 | { ACTION_WPS_SKIPPREV, BUTTON_PREV|BUTTON_REL, BUTTON_PREV }, |
83 | { ACTION_WPS_VOLDOWN, BUTTON_VOL_DOWN, BUTTON_NONE }, | 78 | { ACTION_WPS_STOP, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_PLAY }, |
84 | { ACTION_WPS_VOLDOWN, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE }, | 79 | { ACTION_WPS_VOLDOWN, BUTTON_VOL_DOWN, BUTTON_NONE }, |
85 | { ACTION_WPS_VOLUP, BUTTON_VOL_UP, BUTTON_NONE }, | 80 | { ACTION_WPS_VOLDOWN, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE }, |
86 | { ACTION_WPS_VOLUP, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE }, | 81 | { ACTION_WPS_VOLUP, BUTTON_VOL_UP, BUTTON_NONE }, |
87 | { ACTION_WPS_BROWSE, BUTTON_SELECT|BUTTON_REL, BUTTON_SELECT }, | 82 | { ACTION_WPS_VOLUP, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE }, |
88 | { ACTION_WPS_CONTEXT, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_SELECT }, | 83 | /* { ACTION_WPS_PITCHSCREEN, BUTTON_, BUTTON_ }, */ |
89 | { ACTION_WPS_MENU, BUTTON_REC|BUTTON_REL, BUTTON_REC }, | 84 | /* { ACTION_WPS_ID3SCREEN, BUTTON_, BUTTON_ }, */ |
90 | { ACTION_WPS_QUICKSCREEN, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_SELECT }, | 85 | { ACTION_WPS_CONTEXT, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_SELECT }, |
86 | { ACTION_WPS_QUICKSCREEN, BUTTON_REC|BUTTON_REL, BUTTON_REC }, | ||
87 | { ACTION_WPS_MENU, BUTTON_REC|BUTTON_REPEAT, BUTTON_REC }, | ||
88 | /* { ACTION_WPS_VIEW_PLAYLIST, BUTTON_, BUTTON_ }, */ | ||
89 | /* { ACTION_WPS_REC, BUTTON_, BUTTON_ }, */ | ||
90 | /* { ACTION_WPS_ABSETA_PREVDIR, BUTTON_, BUTTON_ }, */ | ||
91 | /* { ACTION_WPS_ABSETB_NEXTDIR, BUTTON_, BUTTON_ }, */ | ||
92 | /* { ACTION_WPS_ABRESET, BUTTON_, BUTTON_ }, */ | ||
93 | /* { ACTION_WPS_HOTKEY, BUTTON_, BUTTON_ }, */ | ||
91 | 94 | ||
92 | LAST_ITEM_IN_LIST, | 95 | LAST_ITEM_IN_LIST, |
93 | }; /* button_context_wps */ | 96 | }; /* button_context_wps */ |
94 | 97 | ||
95 | static const struct button_mapping button_context_settings[] = { | 98 | static const struct button_mapping button_context_settings[] = { |
96 | { ACTION_SETTINGS_INC, BUTTON_VOL_UP, BUTTON_NONE }, | 99 | { ACTION_SETTINGS_INC, BUTTON_VOL_UP, BUTTON_NONE }, |
97 | { ACTION_SETTINGS_INCREPEAT, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE }, | 100 | { ACTION_SETTINGS_INCREPEAT, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE }, |
98 | { ACTION_SETTINGS_DEC, BUTTON_VOL_DOWN, BUTTON_NONE }, | 101 | /* { ACTION_SETTINGS_INCBIGSTEP,BUTTON_, BUTTON_ }, */ |
99 | { ACTION_SETTINGS_DECREPEAT, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE }, | 102 | { ACTION_SETTINGS_DEC, BUTTON_VOL_DOWN, BUTTON_NONE }, |
100 | { ACTION_STD_PREV, BUTTON_PREV, BUTTON_NONE }, | 103 | { ACTION_SETTINGS_DECREPEAT, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE }, |
101 | { ACTION_STD_PREVREPEAT, BUTTON_PREV|BUTTON_REPEAT, BUTTON_NONE }, | 104 | /* { ACTION_SETTINGS_DECBIGSTEP,BUTTON_, BUTTON_ }, */ |
102 | { ACTION_STD_NEXT, BUTTON_NEXT, BUTTON_NONE }, | ||
103 | { ACTION_STD_NEXTREPEAT, BUTTON_NEXT|BUTTON_REPEAT, BUTTON_NONE }, | ||
104 | { ACTION_STD_OK, BUTTON_SELECT|BUTTON_REL, BUTTON_NONE }, | ||
105 | { ACTION_STD_CANCEL, BUTTON_REC|BUTTON_REL, BUTTON_REC }, | ||
106 | 105 | ||
107 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) | 106 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) |
108 | }; /* button_context_settings */ | 107 | }; /* button_context_settings */ |
109 | 108 | ||
110 | static const struct button_mapping button_context_yesno[] = { | 109 | static const struct button_mapping button_context_yesno[] = { |
111 | { ACTION_YESNO_ACCEPT, BUTTON_SELECT, BUTTON_NONE }, | 110 | { ACTION_YESNO_ACCEPT, BUTTON_SELECT, BUTTON_NONE }, |
111 | { ACTION_YESNO_ACCEPT, BUTTON_PLAY, BUTTON_NONE }, | ||
112 | |||
112 | LAST_ITEM_IN_LIST | 113 | LAST_ITEM_IN_LIST |
113 | }; /* button_context_yesno */ | 114 | }; /* button_context_yesno */ |
114 | 115 | ||
115 | static const struct button_mapping button_context_bmark[] = { | 116 | static const struct button_mapping button_context_bmark[] = { |
116 | { ACTION_BMS_DELETE, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_SELECT }, | 117 | { ACTION_BMS_DELETE, BUTTON_REC|BUTTON_REPEAT, BUTTON_REC }, |
118 | |||
117 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST), | 119 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST), |
118 | }; /* button_context_bmark */ | 120 | }; /* button_context_bmark */ |
119 | 121 | ||
120 | static const struct button_mapping button_context_quickscreen[] = { | 122 | static const struct button_mapping button_context_quickscreen[] = { |
121 | { ACTION_QS_TOP, BUTTON_SELECT, BUTTON_NONE }, | 123 | { ACTION_QS_LEFT, BUTTON_VOL_DOWN, BUTTON_NONE }, |
122 | { ACTION_QS_TOP, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_NONE }, | 124 | { ACTION_QS_LEFT, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE }, |
123 | { ACTION_QS_DOWN, BUTTON_PLAY, BUTTON_NONE }, | 125 | { ACTION_QS_RIGHT, BUTTON_VOL_UP, BUTTON_NONE }, |
124 | { ACTION_QS_DOWN, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_NONE }, | 126 | { ACTION_QS_RIGHT, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE }, |
125 | { ACTION_QS_LEFT, BUTTON_PREV, BUTTON_NONE }, | 127 | { ACTION_QS_DOWN, BUTTON_NEXT, BUTTON_NONE }, |
126 | { ACTION_QS_LEFT, BUTTON_PREV|BUTTON_REPEAT, BUTTON_NONE }, | 128 | { ACTION_QS_DOWN, BUTTON_NEXT|BUTTON_REPEAT, BUTTON_NONE }, |
127 | { ACTION_QS_RIGHT, BUTTON_NEXT, BUTTON_NONE }, | 129 | { ACTION_QS_TOP, BUTTON_PREV, BUTTON_NONE }, |
128 | { ACTION_QS_RIGHT, BUTTON_NEXT|BUTTON_REPEAT, BUTTON_NONE }, | 130 | { ACTION_QS_TOP, BUTTON_PREV|BUTTON_REPEAT, BUTTON_NONE }, |
129 | { ACTION_STD_CANCEL, BUTTON_REC, BUTTON_NONE }, | ||
130 | 131 | ||
131 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) | 132 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) |
132 | }; /* button_context_quickscreen */ | 133 | }; /* button_context_quickscreen */ |
133 | 134 | ||
134 | static const struct button_mapping button_context_pitchscreen[] = { | 135 | static const struct button_mapping button_context_pitchscreen[] = { |
135 | { ACTION_PS_INC_SMALL, BUTTON_VOL_UP, BUTTON_NONE }, | 136 | { ACTION_PS_INC_SMALL, BUTTON_VOL_UP, BUTTON_NONE }, |
136 | { ACTION_PS_INC_BIG, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE }, | 137 | { ACTION_PS_INC_BIG, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE }, |
137 | { ACTION_PS_DEC_SMALL, BUTTON_VOL_DOWN, BUTTON_NONE }, | 138 | { ACTION_PS_DEC_SMALL, BUTTON_VOL_DOWN, BUTTON_NONE }, |
138 | { ACTION_PS_DEC_BIG, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE }, | 139 | { ACTION_PS_DEC_BIG, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE }, |
139 | { ACTION_PS_NUDGE_LEFT, BUTTON_PREV, BUTTON_NONE }, | 140 | { ACTION_PS_NUDGE_LEFT, BUTTON_PREV, BUTTON_NONE }, |
140 | { ACTION_PS_NUDGE_LEFTOFF, BUTTON_PREV|BUTTON_REL, BUTTON_NONE }, | 141 | { ACTION_PS_NUDGE_RIGHT, BUTTON_NEXT, BUTTON_NONE }, |
141 | { ACTION_PS_NUDGE_RIGHT, BUTTON_NEXT, BUTTON_NONE }, | 142 | { ACTION_PS_NUDGE_LEFTOFF, BUTTON_PREV|BUTTON_REL, BUTTON_NONE }, |
142 | { ACTION_PS_NUDGE_RIGHTOFF, BUTTON_NEXT|BUTTON_REL, BUTTON_NONE }, | 143 | { ACTION_PS_NUDGE_RIGHTOFF, BUTTON_NEXT|BUTTON_REL, BUTTON_NONE }, |
143 | { ACTION_PS_TOGGLE_MODE, BUTTON_PLAY, BUTTON_NONE }, | 144 | { ACTION_PS_TOGGLE_MODE, BUTTON_PLAY, BUTTON_NONE }, |
144 | { ACTION_PS_RESET, BUTTON_SELECT, BUTTON_NONE }, | 145 | { ACTION_PS_RESET, BUTTON_SELECT, BUTTON_NONE }, |
145 | { ACTION_PS_EXIT, BUTTON_REC, BUTTON_NONE }, | 146 | { ACTION_PS_EXIT, BUTTON_REC, BUTTON_NONE }, |
146 | { ACTION_PS_SLOWER, BUTTON_PREV|BUTTON_REPEAT, BUTTON_NONE }, | 147 | { ACTION_PS_SLOWER, BUTTON_PREV|BUTTON_REPEAT, BUTTON_NONE }, |
147 | { ACTION_PS_FASTER, BUTTON_NEXT|BUTTON_REPEAT, BUTTON_NONE }, | 148 | { ACTION_PS_FASTER, BUTTON_NEXT|BUTTON_REPEAT, BUTTON_NONE }, |
148 | 149 | ||
149 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) | 150 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) |
150 | }; /* button_context_pitchscreen */ | 151 | }; /* button_context_pitchscreen */ |
151 | 152 | ||
152 | static const struct button_mapping button_context_radio[] = { | 153 | static const struct button_mapping button_context_radio[] = { |
153 | { ACTION_FM_MENU, BUTTON_SELECT | BUTTON_REPEAT, BUTTON_NONE }, | 154 | { ACTION_FM_MENU, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_NONE }, |
154 | { ACTION_FM_PRESET, BUTTON_SELECT | BUTTON_REL, BUTTON_SELECT }, | 155 | { ACTION_FM_PRESET, BUTTON_SELECT|BUTTON_REL, BUTTON_SELECT }, |
155 | { ACTION_FM_MODE, BUTTON_SELECT, BUTTON_NONE }, | 156 | /* { ACTION_FM_RECORD, BUTTON_, BUTTON_ }, */ |
156 | { ACTION_FM_STOP, BUTTON_PLAY | BUTTON_REPEAT, BUTTON_PLAY }, | 157 | /* { ACTION_FM_FREEZE, BUTTON_, BUTTON_ }, */ |
157 | { ACTION_FM_EXIT, BUTTON_REC | BUTTON_REL, BUTTON_REC }, | 158 | { ACTION_FM_STOP, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_PLAY }, |
158 | { ACTION_FM_PLAY, BUTTON_PLAY | BUTTON_REL, BUTTON_PLAY }, | 159 | { ACTION_FM_MODE, BUTTON_SELECT, BUTTON_NONE }, |
159 | { ACTION_SETTINGS_INC, BUTTON_VOL_UP, BUTTON_NONE }, | 160 | { ACTION_FM_EXIT, BUTTON_REC|BUTTON_REL, BUTTON_REC }, |
160 | { ACTION_SETTINGS_INCREPEAT, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE }, | 161 | { ACTION_FM_PLAY, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY }, |
161 | { ACTION_SETTINGS_DEC, BUTTON_VOL_DOWN, BUTTON_NONE }, | 162 | /* { ACTION_FM_RECORD_DBLPRE, BUTTON_, BUTTON_ }, */ |
162 | { ACTION_SETTINGS_DECREPEAT, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE }, | 163 | /* { ACTION_FM_NEXT_PRESET, BUTTON_, BUTTON_ }, */ |
163 | { ACTION_STD_NEXT, BUTTON_NEXT, BUTTON_NONE }, | 164 | /* { ACTION_FM_PREV_PRESET, BUTTON_, BUTTON_ }, */ |
164 | { ACTION_STD_NEXTREPEAT, BUTTON_NEXT|BUTTON_REPEAT, BUTTON_NONE }, | ||
165 | { ACTION_STD_PREV, BUTTON_PREV, BUTTON_NONE }, | ||
166 | { ACTION_STD_PREVREPEAT, BUTTON_PREV|BUTTON_REPEAT, BUTTON_NONE }, | ||
167 | 165 | ||
168 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS) | 166 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS) |
167 | }; /* button_context_radio */ | ||
169 | 168 | ||
170 | }; | 169 | static const struct button_mapping button_context_recscreen[] = { |
170 | /* { ACTION_REC_LCD, BUTTON_, BUTTON_ }, */ | ||
171 | { ACTION_REC_PAUSE, BUTTON_PLAY, BUTTON_NONE }, | ||
172 | { ACTION_REC_NEWFILE, BUTTON_REC|BUTTON_REPEAT, BUTTON_REC }, | ||
173 | /* { ACTION_REC_F2, BUTTON_, BUTTON_ }, */ | ||
174 | /* { ACTION_REC_F3, BUTTON_, BUTTON_ }, */ | ||
175 | |||
176 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS) | ||
177 | }; /* button_context_recscreen */ | ||
178 | |||
179 | static const struct button_mapping button_context_keyboard[] = { | ||
180 | { ACTION_KBD_LEFT, BUTTON_VOL_DOWN, BUTTON_NONE }, | ||
181 | { ACTION_KBD_LEFT, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE }, | ||
182 | { ACTION_KBD_RIGHT, BUTTON_VOL_UP, BUTTON_NONE }, | ||
183 | { ACTION_KBD_RIGHT, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE }, | ||
184 | /* { ACTION_KBD_CURSOR_LEFT, BUTTON_, BUTTON_ }, */ | ||
185 | /* { ACTION_KBD_CURSOR_RIGHT, BUTTON_, BUTTON_ }, */ | ||
186 | { ACTION_KBD_SELECT, BUTTON_SELECT, BUTTON_NONE }, | ||
187 | { ACTION_KBD_PAGE_FLIP, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_PLAY }, | ||
188 | { ACTION_KBD_DONE, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY }, | ||
189 | { ACTION_KBD_ABORT, BUTTON_REC|BUTTON_REL, BUTTON_REC }, | ||
190 | /* { ACTION_KBD_BACKSPACE, BUTTON_, BUTTON_ }, */ | ||
191 | { ACTION_KBD_UP, BUTTON_PREV, BUTTON_NONE }, | ||
192 | { ACTION_KBD_UP, BUTTON_PREV|BUTTON_REPEAT, BUTTON_NONE }, | ||
193 | { ACTION_KBD_DOWN, BUTTON_NEXT, BUTTON_NONE }, | ||
194 | { ACTION_KBD_DOWN, BUTTON_NEXT|BUTTON_REPEAT, BUTTON_NONE }, | ||
195 | { ACTION_KBD_MORSE_INPUT, BUTTON_REC|BUTTON_REPEAT, BUTTON_REC }, | ||
196 | { ACTION_KBD_MORSE_SELECT, BUTTON_SELECT|BUTTON_REL, BUTTON_NONE }, | ||
197 | |||
198 | LAST_ITEM_IN_LIST | ||
199 | }; /* button_context_keyboard */ | ||
171 | 200 | ||
172 | const struct button_mapping* get_context_mapping(int context) | 201 | const struct button_mapping* get_context_mapping(int context) |
173 | { | 202 | { |
@@ -175,18 +204,47 @@ const struct button_mapping* get_context_mapping(int context) | |||
175 | { | 204 | { |
176 | case CONTEXT_STD: | 205 | case CONTEXT_STD: |
177 | return button_context_standard; | 206 | return button_context_standard; |
207 | |||
178 | case CONTEXT_WPS: | 208 | case CONTEXT_WPS: |
179 | return button_context_wps; | 209 | return button_context_wps; |
210 | |||
180 | #if CONFIG_TUNER | 211 | #if CONFIG_TUNER |
181 | case CONTEXT_FM: | 212 | case CONTEXT_FM: |
182 | return button_context_radio; | 213 | return button_context_radio; |
183 | #endif | 214 | #endif |
184 | case CONTEXT_TREE: | 215 | |
185 | case CONTEXT_LIST: | 216 | #ifdef HAVE_RECORDING |
186 | case CONTEXT_MAINMENU: | 217 | case CONTEXT_RECSCREEN: |
218 | return button_context_recscreen; | ||
219 | #endif | ||
220 | |||
221 | case CONTEXT_YESNOSCREEN: | ||
222 | return button_context_yesno; | ||
223 | |||
224 | case CONTEXT_BOOKMARKSCREEN: | ||
225 | return button_context_bmark; | ||
226 | |||
227 | case CONTEXT_QUICKSCREEN: | ||
228 | return button_context_quickscreen; | ||
229 | |||
230 | case CONTEXT_PITCHSCREEN: | ||
231 | return button_context_pitchscreen; | ||
232 | |||
233 | case CONTEXT_KEYBOARD: | ||
234 | case CONTEXT_MORSE_INPUT: | ||
235 | return button_context_keyboard; | ||
187 | 236 | ||
188 | case CONTEXT_SETTINGS: | 237 | case CONTEXT_SETTINGS: |
238 | case CONTEXT_SETTINGS_EQ: | ||
189 | case CONTEXT_SETTINGS|CONTEXT_REMOTE: | 239 | case CONTEXT_SETTINGS|CONTEXT_REMOTE: |
240 | return button_context_settings; | ||
241 | |||
242 | case CONTEXT_TREE: | ||
243 | case CONTEXT_MAINMENU: | ||
244 | case CONTEXT_CUSTOM|CONTEXT_TREE: | ||
245 | return button_context_tree; | ||
246 | |||
247 | case CONTEXT_LIST: | ||
190 | default: | 248 | default: |
191 | return button_context_standard; | 249 | return button_context_standard; |
192 | } | 250 | } |