1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 * Copyright (C) 2008 Jens Arnold
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
23 * Button Code Definitions for iaudio M3 targets
31 /* CONTEXT_CUSTOM's used in this file...
33 CONTEXT_CUSTOM|CONTEXT_TREE = the standard list/tree defines (without directions)
38 /** Keep things alphabetized for easy reference but standard contexts can
39 ** be first and sub-alphebetized.
42 /** Standard Button Contexts **/
43 static const struct button_mapping button_context_standard
[] = {
44 { ACTION_STD_PREV
, BUTTON_VOL_UP
, BUTTON_NONE
},
45 { ACTION_STD_PREVREPEAT
, BUTTON_VOL_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
46 { ACTION_STD_NEXT
, BUTTON_VOL_DOWN
, BUTTON_NONE
},
47 { ACTION_STD_NEXTREPEAT
, BUTTON_VOL_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
49 { ACTION_STD_CONTEXT
, BUTTON_MODE
|BUTTON_REPEAT
, BUTTON_MODE
},
50 { ACTION_STD_CANCEL
, BUTTON_LEFT
, BUTTON_NONE
},
51 { ACTION_STD_OK
, BUTTON_RIGHT
, BUTTON_NONE
},
52 { ACTION_STD_OK
, BUTTON_PLAY
, BUTTON_NONE
},
53 { ACTION_STD_MENU
, BUTTON_REC
|BUTTON_REL
, BUTTON_REC
},
54 { ACTION_STD_QUICKSCREEN
, BUTTON_REC
|BUTTON_REPEAT
, BUTTON_REC
},
57 }; /* button_context_standard */
59 static const struct button_mapping remote_button_context_standard
[] = {
60 { ACTION_STD_PREV
, BUTTON_RC_VOL_UP
, BUTTON_NONE
},
61 { ACTION_STD_PREVREPEAT
, BUTTON_RC_VOL_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
62 { ACTION_STD_NEXT
, BUTTON_RC_VOL_DOWN
, BUTTON_NONE
},
63 { ACTION_STD_NEXTREPEAT
, BUTTON_RC_VOL_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
65 { ACTION_STD_CONTEXT
, BUTTON_RC_MODE
|BUTTON_REPEAT
, BUTTON_RC_MODE
},
66 { ACTION_STD_CANCEL
, BUTTON_RC_REW
, BUTTON_NONE
},
67 { ACTION_STD_OK
, BUTTON_RC_FF
, BUTTON_NONE
},
68 { ACTION_STD_OK
, BUTTON_RC_PLAY
, BUTTON_NONE
},
69 { ACTION_STD_MENU
, BUTTON_RC_MENU
|BUTTON_REL
, BUTTON_RC_MENU
},
70 { ACTION_STD_QUICKSCREEN
, BUTTON_RC_MENU
|BUTTON_REPEAT
, BUTTON_RC_MENU
},
73 }; /* remote_button_context_standard */
75 /** Bookmark Screen **/
76 static const struct button_mapping button_context_bmark
[] = {
77 { ACTION_BMS_DELETE
, BUTTON_REC
|BUTTON_REPEAT
, BUTTON_REC
},
79 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST
),
80 }; /* button_context_settings_bmark */
82 static const struct button_mapping remote_button_context_bmark
[] = {
83 { ACTION_BMS_DELETE
, BUTTON_RC_REC
|BUTTON_REPEAT
, BUTTON_RC_REC
},
85 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST
),
86 }; /* button_context_settings_bmark */
88 /** FM Radio Screen **/
89 static const struct button_mapping button_context_radio
[] = {
90 { ACTION_FM_MENU
, BUTTON_MODE
|BUTTON_REPEAT
, BUTTON_MODE
},
91 { ACTION_FM_PRESET
, BUTTON_MODE
|BUTTON_REL
, BUTTON_MODE
},
92 { ACTION_FM_STOP
, BUTTON_PLAY
|BUTTON_REPEAT
, BUTTON_PLAY
},
93 { ACTION_FM_PLAY
, BUTTON_PLAY
|BUTTON_REL
, BUTTON_PLAY
},
94 { ACTION_FM_MODE
, BUTTON_REC
|BUTTON_REPEAT
, BUTTON_REC
},
95 { ACTION_FM_EXIT
, BUTTON_REC
|BUTTON_REL
, BUTTON_REC
},
96 { ACTION_STD_PREVREPEAT
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
97 { ACTION_STD_NEXT
, BUTTON_RIGHT
, BUTTON_NONE
},
98 { ACTION_STD_NEXTREPEAT
, BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
100 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS
)
101 }; /* button_context_radio */
103 static const struct button_mapping remote_button_context_radio
[] = {
104 { ACTION_FM_MENU
, BUTTON_RC_MODE
|BUTTON_REPEAT
, BUTTON_RC_MODE
},
105 { ACTION_FM_PRESET
, BUTTON_RC_MODE
|BUTTON_REL
, BUTTON_RC_MODE
},
106 { ACTION_FM_STOP
, BUTTON_RC_PLAY
|BUTTON_REPEAT
, BUTTON_RC_PLAY
},
107 { ACTION_FM_PLAY
, BUTTON_RC_PLAY
|BUTTON_REL
, BUTTON_RC_PLAY
},
108 { ACTION_FM_MODE
, BUTTON_RC_REC
|BUTTON_REPEAT
, BUTTON_RC_REC
},
109 { ACTION_FM_EXIT
, BUTTON_RC_MENU
, BUTTON_NONE
},
110 { ACTION_STD_PREVREPEAT
, BUTTON_RC_REW
|BUTTON_REPEAT
, BUTTON_NONE
},
111 { ACTION_STD_NEXT
, BUTTON_RC_FF
, BUTTON_NONE
},
112 { ACTION_STD_NEXTREPEAT
, BUTTON_RC_FF
|BUTTON_REPEAT
, BUTTON_NONE
},
114 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS
)
115 }; /* remote_button_context_radio */
118 static const struct button_mapping button_context_keyboard
[] = {
119 { ACTION_KBD_LEFT
, BUTTON_LEFT
, BUTTON_NONE
},
120 { ACTION_KBD_LEFT
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
121 { ACTION_KBD_RIGHT
, BUTTON_RIGHT
, BUTTON_NONE
},
122 { ACTION_KBD_RIGHT
, BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
123 { ACTION_KBD_UP
, BUTTON_VOL_UP
, BUTTON_NONE
},
124 { ACTION_KBD_UP
, BUTTON_VOL_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
125 { ACTION_KBD_DOWN
, BUTTON_VOL_DOWN
, BUTTON_NONE
},
126 { ACTION_KBD_DOWN
, BUTTON_VOL_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
127 { ACTION_KBD_PAGE_FLIP
, BUTTON_MODE
, BUTTON_NONE
},
128 { ACTION_KBD_SELECT
, BUTTON_PLAY
|BUTTON_REL
, BUTTON_PLAY
},
129 { ACTION_KBD_DONE
, BUTTON_PLAY
|BUTTON_REPEAT
, BUTTON_PLAY
},
130 { ACTION_KBD_ABORT
, BUTTON_REC
, BUTTON_NONE
},
133 }; /* button_context_keyboard */
135 static const struct button_mapping remote_button_context_keyboard
[] = {
136 { ACTION_KBD_LEFT
, BUTTON_RC_REW
, BUTTON_NONE
},
137 { ACTION_KBD_LEFT
, BUTTON_RC_REW
|BUTTON_REPEAT
, BUTTON_NONE
},
138 { ACTION_KBD_RIGHT
, BUTTON_RC_FF
, BUTTON_NONE
},
139 { ACTION_KBD_RIGHT
, BUTTON_RC_FF
|BUTTON_REPEAT
, BUTTON_NONE
},
140 { ACTION_KBD_UP
, BUTTON_RC_VOL_UP
, BUTTON_NONE
},
141 { ACTION_KBD_UP
, BUTTON_RC_VOL_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
142 { ACTION_KBD_DOWN
, BUTTON_RC_VOL_DOWN
, BUTTON_NONE
},
143 { ACTION_KBD_DOWN
, BUTTON_RC_VOL_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
144 { ACTION_KBD_PAGE_FLIP
, BUTTON_RC_MODE
, BUTTON_NONE
},
145 { ACTION_KBD_SELECT
, BUTTON_RC_PLAY
|BUTTON_REL
, BUTTON_RC_PLAY
},
146 { ACTION_KBD_DONE
, BUTTON_RC_PLAY
|BUTTON_REPEAT
, BUTTON_RC_PLAY
},
147 { ACTION_KBD_ABORT
, BUTTON_RC_REC
, BUTTON_NONE
},
150 }; /* remote_button_context_keyboard */
153 static const struct button_mapping button_context_pitchscreen
[] = {
154 { ACTION_PS_INC_SMALL
, BUTTON_VOL_UP
, BUTTON_NONE
},
155 { ACTION_PS_INC_BIG
, BUTTON_VOL_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
156 { ACTION_PS_DEC_SMALL
, BUTTON_VOL_DOWN
, BUTTON_NONE
},
157 { ACTION_PS_DEC_BIG
, BUTTON_VOL_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
158 { ACTION_PS_NUDGE_LEFT
, BUTTON_LEFT
, BUTTON_NONE
},
159 { ACTION_PS_NUDGE_LEFTOFF
, BUTTON_LEFT
|BUTTON_REL
, BUTTON_NONE
},
160 { ACTION_PS_NUDGE_RIGHT
, BUTTON_RIGHT
, BUTTON_NONE
},
161 { ACTION_PS_NUDGE_RIGHTOFF
, BUTTON_RIGHT
|BUTTON_REL
, BUTTON_NONE
},
162 { ACTION_PS_TOGGLE_MODE
, BUTTON_MODE
, BUTTON_NONE
},
163 { ACTION_PS_RESET
, BUTTON_REC
, BUTTON_NONE
},
164 { ACTION_PS_EXIT
, BUTTON_PLAY
, BUTTON_NONE
},
165 { ACTION_PS_SLOWER
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
166 { ACTION_PS_FASTER
, BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
168 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
169 }; /* button_context_pitchscreen */
171 static const struct button_mapping remote_button_context_pitchscreen
[] = {
172 { ACTION_PS_INC_SMALL
, BUTTON_RC_VOL_UP
, BUTTON_NONE
},
173 { ACTION_PS_INC_BIG
, BUTTON_RC_VOL_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
174 { ACTION_PS_DEC_SMALL
, BUTTON_RC_VOL_DOWN
, BUTTON_NONE
},
175 { ACTION_PS_DEC_BIG
, BUTTON_RC_VOL_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
176 { ACTION_PS_NUDGE_LEFT
, BUTTON_RC_REW
, BUTTON_NONE
},
177 { ACTION_PS_NUDGE_LEFTOFF
, BUTTON_RC_REW
|BUTTON_REL
, BUTTON_NONE
},
178 { ACTION_PS_NUDGE_RIGHT
, BUTTON_RC_FF
, BUTTON_NONE
},
179 { ACTION_PS_NUDGE_RIGHTOFF
, BUTTON_RC_FF
|BUTTON_REL
, BUTTON_NONE
},
180 { ACTION_PS_TOGGLE_MODE
, BUTTON_RC_MODE
, BUTTON_NONE
},
181 { ACTION_PS_RESET
, BUTTON_RC_REC
, BUTTON_NONE
},
182 { ACTION_PS_EXIT
, BUTTON_RC_PLAY
, BUTTON_NONE
},
183 { ACTION_PS_SLOWER
, BUTTON_RC_REW
|BUTTON_REPEAT
, BUTTON_NONE
},
184 { ACTION_PS_FASTER
, BUTTON_RC_FF
|BUTTON_REPEAT
, BUTTON_NONE
},
186 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
187 }; /* remote_button_context_pitchscreen */
190 static const struct button_mapping button_context_quickscreen
[] = {
191 { ACTION_QS_DOWNINV
, BUTTON_VOL_UP
, BUTTON_NONE
},
192 { ACTION_QS_DOWNINV
, BUTTON_VOL_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
193 { ACTION_QS_DOWN
, BUTTON_VOL_DOWN
, BUTTON_NONE
},
194 { ACTION_QS_DOWN
, BUTTON_VOL_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
195 { ACTION_QS_LEFT
, BUTTON_LEFT
, BUTTON_NONE
},
196 { ACTION_QS_LEFT
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
197 { ACTION_QS_RIGHT
, BUTTON_RIGHT
, BUTTON_NONE
},
198 { ACTION_QS_RIGHT
, BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
199 { ACTION_STD_CANCEL
, BUTTON_REC
, BUTTON_NONE
},
201 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
202 }; /* button_context_quickscreen */
204 static const struct button_mapping remote_button_context_quickscreen
[] = {
205 { ACTION_QS_DOWNINV
, BUTTON_RC_VOL_UP
, BUTTON_NONE
},
206 { ACTION_QS_DOWNINV
, BUTTON_RC_VOL_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
207 { ACTION_QS_DOWN
, BUTTON_RC_VOL_DOWN
, BUTTON_NONE
},
208 { ACTION_QS_DOWN
, BUTTON_RC_VOL_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
209 { ACTION_QS_LEFT
, BUTTON_RC_REW
, BUTTON_NONE
},
210 { ACTION_QS_LEFT
, BUTTON_RC_REW
|BUTTON_REPEAT
, BUTTON_NONE
},
211 { ACTION_QS_RIGHT
, BUTTON_RC_FF
, BUTTON_NONE
},
212 { ACTION_QS_RIGHT
, BUTTON_RC_FF
|BUTTON_REPEAT
, BUTTON_NONE
},
213 { ACTION_STD_CANCEL
, BUTTON_RC_REC
, BUTTON_NONE
},
215 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
216 }; /* remote_button_context_quickscreen */
218 /** Recording Screen **/
219 static const struct button_mapping button_context_recscreen
[] = {
220 { ACTION_REC_PAUSE
, BUTTON_PLAY
|BUTTON_REL
, BUTTON_PLAY
},
221 { ACTION_STD_CANCEL
, BUTTON_PLAY
|BUTTON_REPEAT
, BUTTON_PLAY
},
222 { ACTION_REC_NEWFILE
, BUTTON_REC
|BUTTON_REL
, BUTTON_REC
},
223 { ACTION_STD_MENU
, BUTTON_REC
|BUTTON_REPEAT
, BUTTON_REC
},
224 { ACTION_SETTINGS_INC
, BUTTON_RIGHT
, BUTTON_NONE
},
225 { ACTION_SETTINGS_INCREPEAT
, BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
226 { ACTION_SETTINGS_DEC
, BUTTON_LEFT
, BUTTON_NONE
},
227 { ACTION_SETTINGS_DECREPEAT
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
229 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
230 }; /* button_context_recscreen */
232 static const struct button_mapping remote_button_context_recscreen
[] = {
233 { ACTION_REC_PAUSE
, BUTTON_RC_PLAY
|BUTTON_REL
, BUTTON_RC_PLAY
},
234 { ACTION_STD_CANCEL
, BUTTON_RC_PLAY
|BUTTON_REPEAT
, BUTTON_RC_PLAY
},
235 { ACTION_REC_NEWFILE
, BUTTON_RC_REC
, BUTTON_NONE
},
236 { ACTION_STD_MENU
, BUTTON_RC_MENU
, BUTTON_NONE
},
237 { ACTION_SETTINGS_INC
, BUTTON_RC_FF
, BUTTON_NONE
},
238 { ACTION_SETTINGS_INCREPEAT
, BUTTON_RC_FF
|BUTTON_REPEAT
, BUTTON_NONE
},
239 { ACTION_SETTINGS_DEC
, BUTTON_RC_REW
, BUTTON_NONE
},
240 { ACTION_SETTINGS_DECREPEAT
, BUTTON_RC_REW
|BUTTON_REPEAT
, BUTTON_NONE
},
242 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
243 }; /* remote_button_context_recscreen */
245 /** Settings - General Mappings **/
246 static const struct button_mapping button_context_settings
[] = {
247 { ACTION_SETTINGS_INC
, BUTTON_VOL_UP
, BUTTON_NONE
},
248 { ACTION_SETTINGS_INCREPEAT
, BUTTON_VOL_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
249 { ACTION_SETTINGS_DEC
, BUTTON_VOL_DOWN
, BUTTON_NONE
},
250 { ACTION_SETTINGS_DECREPEAT
, BUTTON_VOL_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
251 { ACTION_STD_PREV
, BUTTON_LEFT
, BUTTON_NONE
},
252 { ACTION_STD_CANCEL
, BUTTON_REC
, BUTTON_NONE
},
254 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
255 }; /* button_context_settings */
257 static const struct button_mapping remote_button_context_settings
[] = {
258 { ACTION_SETTINGS_INC
, BUTTON_RC_VOL_UP
, BUTTON_NONE
},
259 { ACTION_SETTINGS_INCREPEAT
, BUTTON_RC_VOL_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
260 { ACTION_SETTINGS_DEC
, BUTTON_RC_VOL_DOWN
, BUTTON_NONE
},
261 { ACTION_SETTINGS_DECREPEAT
, BUTTON_RC_VOL_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
262 { ACTION_STD_PREV
, BUTTON_RC_REW
, BUTTON_NONE
},
263 { ACTION_STD_CANCEL
, BUTTON_RC_REC
, BUTTON_NONE
},
265 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
266 }; /* remote_button_context_settings */
268 /** Settings - Using Sliders **/
269 static const struct button_mapping button_context_settings_r_is_inc
[] = {
270 { ACTION_SETTINGS_INC
, BUTTON_RIGHT
, BUTTON_NONE
},
271 { ACTION_SETTINGS_INCREPEAT
, BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
272 { ACTION_SETTINGS_DEC
, BUTTON_LEFT
, BUTTON_NONE
},
273 { ACTION_SETTINGS_DECREPEAT
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
274 { ACTION_STD_CANCEL
, BUTTON_REC
, BUTTON_NONE
},
276 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
277 }; /* button_context_settings_r_is_inc */
279 static const struct button_mapping remote_button_context_settings_r_is_inc
[] = {
280 { ACTION_SETTINGS_INC
, BUTTON_RC_FF
, BUTTON_NONE
},
281 { ACTION_SETTINGS_INCREPEAT
, BUTTON_RC_FF
|BUTTON_REPEAT
, BUTTON_NONE
},
282 { ACTION_SETTINGS_DEC
, BUTTON_RC_REW
, BUTTON_NONE
},
283 { ACTION_SETTINGS_DECREPEAT
, BUTTON_RC_REW
|BUTTON_REPEAT
,BUTTON_NONE
},
284 { ACTION_STD_CANCEL
, BUTTON_RC_REC
, BUTTON_NONE
},
286 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
287 }; /* remote_button_context_settings_r_is_inc */
290 static const struct button_mapping button_context_tree
[] = {
291 { ACTION_NONE
, BUTTON_PLAY
, BUTTON_NONE
},
292 { ACTION_TREE_WPS
, BUTTON_PLAY
|BUTTON_REL
, BUTTON_PLAY
},
293 { ACTION_TREE_STOP
, BUTTON_PLAY
|BUTTON_REPEAT
, BUTTON_PLAY
},
295 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
296 }; /* button_context_tree */
298 static const struct button_mapping remote_button_context_tree
[] = {
299 { ACTION_NONE
, BUTTON_RC_PLAY
, BUTTON_NONE
},
300 { ACTION_TREE_WPS
, BUTTON_RC_PLAY
|BUTTON_REL
, BUTTON_RC_PLAY
},
301 { ACTION_TREE_STOP
, BUTTON_RC_PLAY
|BUTTON_REPEAT
, BUTTON_RC_PLAY
},
303 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
304 }; /* remote_button_context_tree */
306 static const struct button_mapping button_context_tree_scroll_lr
[] = {
307 { ACTION_NONE
, BUTTON_LEFT
, BUTTON_NONE
},
308 { ACTION_STD_CANCEL
, BUTTON_LEFT
|BUTTON_REL
, BUTTON_LEFT
},
309 { ACTION_TREE_ROOT_INIT
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_LEFT
},
310 { ACTION_TREE_PGLEFT
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
311 { ACTION_TREE_PGLEFT
, BUTTON_LEFT
|BUTTON_REL
, BUTTON_LEFT
|BUTTON_REPEAT
},
312 { ACTION_NONE
, BUTTON_RIGHT
, BUTTON_NONE
},
313 { ACTION_STD_OK
, BUTTON_RIGHT
|BUTTON_REL
, BUTTON_RIGHT
},
314 { ACTION_TREE_PGRIGHT
, BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
315 { ACTION_TREE_PGRIGHT
, BUTTON_RIGHT
|BUTTON_REL
, BUTTON_RIGHT
|BUTTON_REPEAT
},
317 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM
|CONTEXT_TREE
),
318 }; /* button_context_tree_scroll_lr */
320 static const struct button_mapping remote_button_context_tree_scroll_lr
[] = {
321 { ACTION_NONE
, BUTTON_RC_REW
, BUTTON_NONE
},
322 { ACTION_STD_CANCEL
, BUTTON_RC_REW
|BUTTON_REL
, BUTTON_RC_REW
},
323 { ACTION_TREE_ROOT_INIT
, BUTTON_RC_REW
|BUTTON_REPEAT
, BUTTON_RC_REW
},
324 { ACTION_TREE_PGLEFT
, BUTTON_RC_REW
|BUTTON_REPEAT
, BUTTON_NONE
},
325 { ACTION_TREE_PGLEFT
, BUTTON_RC_REW
|BUTTON_REL
, BUTTON_RC_REW
|BUTTON_REPEAT
},
326 { ACTION_NONE
, BUTTON_RC_FF
, BUTTON_NONE
},
327 { ACTION_STD_OK
, BUTTON_RC_FF
|BUTTON_REL
, BUTTON_RC_FF
},
328 { ACTION_TREE_PGRIGHT
, BUTTON_RC_FF
|BUTTON_REPEAT
, BUTTON_NONE
},
329 { ACTION_TREE_PGRIGHT
, BUTTON_RC_FF
|BUTTON_REL
, BUTTON_RC_FF
|BUTTON_REPEAT
},
331 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM
|CONTEXT_TREE
),
332 }; /* remote_button_context_tree_scroll_lr */
334 /** While-Playing Screen (WPS) **/
335 static const struct button_mapping button_context_wps
[] = {
336 { ACTION_WPS_PLAY
, BUTTON_PLAY
|BUTTON_REL
, BUTTON_PLAY
},
337 { ACTION_WPS_STOP
, BUTTON_PLAY
|BUTTON_REPEAT
, BUTTON_PLAY
},
338 { ACTION_WPS_SKIPPREV
, BUTTON_LEFT
|BUTTON_REL
, BUTTON_LEFT
},
339 { ACTION_WPS_SEEKBACK
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
340 { ACTION_WPS_STOPSEEK
, BUTTON_LEFT
|BUTTON_REL
, BUTTON_LEFT
|BUTTON_REPEAT
},
341 { ACTION_WPS_SKIPNEXT
, BUTTON_RIGHT
|BUTTON_REL
, BUTTON_RIGHT
},
342 { ACTION_WPS_SEEKFWD
, BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
343 { ACTION_WPS_STOPSEEK
, BUTTON_RIGHT
|BUTTON_REL
, BUTTON_RIGHT
|BUTTON_REPEAT
},
345 { ACTION_WPS_VOLDOWN
, BUTTON_VOL_DOWN
, BUTTON_NONE
},
346 { ACTION_WPS_VOLDOWN
, BUTTON_VOL_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
347 { ACTION_WPS_VOLUP
, BUTTON_VOL_UP
, BUTTON_NONE
},
348 { ACTION_WPS_VOLUP
, BUTTON_VOL_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
350 { ACTION_WPS_BROWSE
, BUTTON_MODE
|BUTTON_REL
, BUTTON_MODE
},
351 { ACTION_WPS_CONTEXT
, BUTTON_MODE
|BUTTON_REPEAT
, BUTTON_MODE
},
352 { ACTION_WPS_MENU
, BUTTON_REC
|BUTTON_REL
, BUTTON_REC
},
353 { ACTION_WPS_QUICKSCREEN
, BUTTON_REC
|BUTTON_REPEAT
, BUTTON_REC
},
354 { ACTION_WPS_VIEW_PLAYLIST
,BUTTON_REC
|BUTTON_MODE
, BUTTON_REC
},
357 }; /* button_context_wps */
359 static const struct button_mapping remote_button_context_wps
[] = {
360 { ACTION_WPS_PLAY
, BUTTON_RC_PLAY
|BUTTON_REL
, BUTTON_RC_PLAY
},
361 { ACTION_WPS_STOP
, BUTTON_RC_PLAY
|BUTTON_REPEAT
, BUTTON_RC_PLAY
},
362 { ACTION_WPS_SKIPPREV
, BUTTON_RC_REW
|BUTTON_REL
, BUTTON_RC_REW
},
363 { ACTION_WPS_SEEKBACK
, BUTTON_RC_REW
|BUTTON_REPEAT
, BUTTON_NONE
},
364 { ACTION_WPS_STOPSEEK
, BUTTON_RC_REW
|BUTTON_REL
, BUTTON_RC_REW
|BUTTON_REPEAT
},
365 { ACTION_WPS_SKIPNEXT
, BUTTON_RC_FF
|BUTTON_REL
, BUTTON_RC_FF
},
366 { ACTION_WPS_SEEKFWD
, BUTTON_RC_FF
|BUTTON_REPEAT
, BUTTON_NONE
},
367 { ACTION_WPS_STOPSEEK
, BUTTON_RC_FF
|BUTTON_REL
, BUTTON_RC_FF
|BUTTON_REPEAT
},
369 { ACTION_WPS_VOLDOWN
, BUTTON_RC_VOL_DOWN
, BUTTON_NONE
},
370 { ACTION_WPS_VOLDOWN
, BUTTON_RC_VOL_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
371 { ACTION_WPS_VOLUP
, BUTTON_RC_VOL_UP
, BUTTON_NONE
},
372 { ACTION_WPS_VOLUP
, BUTTON_RC_VOL_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
374 { ACTION_WPS_BROWSE
, BUTTON_RC_MODE
|BUTTON_REL
, BUTTON_RC_MODE
},
375 { ACTION_WPS_CONTEXT
, BUTTON_RC_MODE
|BUTTON_REPEAT
, BUTTON_RC_MODE
},
376 { ACTION_WPS_MENU
, BUTTON_RC_MENU
|BUTTON_REL
, BUTTON_RC_MENU
},
377 { ACTION_WPS_QUICKSCREEN
, BUTTON_RC_MENU
|BUTTON_REPEAT
, BUTTON_RC_MENU
},
380 }; /* remote_button_context_wps */
382 /** Yes/No Screen **/
383 static const struct button_mapping button_context_yesnoscreen
[] = {
384 { ACTION_YESNO_ACCEPT
, BUTTON_PLAY
, BUTTON_NONE
},
386 }; /* button_context_yesnoscreen */
388 static const struct button_mapping remote_button_context_yesnoscreen
[] = {
389 { ACTION_YESNO_ACCEPT
, BUTTON_RC_PLAY
, BUTTON_NONE
},
391 }; /* remote_button_context_yesnoscreen */
394 static const struct button_mapping
* get_context_mapping_remote( int context
)
396 context
^= CONTEXT_REMOTE
;
400 /* anything that uses remote_button_context_standard */
402 return remote_button_context_standard
;
404 /* remote contexts with special mapping */
405 case CONTEXT_BOOKMARKSCREEN
:
406 return remote_button_context_bmark
;
409 return remote_button_context_radio
;
411 case CONTEXT_KEYBOARD
:
412 return remote_button_context_keyboard
;
414 case CONTEXT_PITCHSCREEN
:
415 return remote_button_context_pitchscreen
;
417 case CONTEXT_QUICKSCREEN
:
418 return remote_button_context_quickscreen
;
420 case CONTEXT_RECSCREEN
:
421 return remote_button_context_recscreen
;
423 case CONTEXT_SETTINGS
:
424 return remote_button_context_settings
;
426 case CONTEXT_SETTINGS_EQ
:
427 case CONTEXT_SETTINGS_TIME
:
428 return remote_button_context_settings_r_is_inc
;
431 case CONTEXT_MAINMENU
:
432 if (global_settings
.hold_lr_for_scroll_in_list
)
433 return remote_button_context_tree_scroll_lr
;
434 /* else fall through to CONTEXT_TREE|CONTEXT_CUSTOM */
435 case CONTEXT_TREE
|CONTEXT_CUSTOM
:
436 return remote_button_context_tree
;
439 return remote_button_context_wps
;
441 case CONTEXT_YESNOSCREEN
:
442 return remote_button_context_yesnoscreen
;
446 const struct button_mapping
* get_context_mapping(int context
)
448 if (context
& CONTEXT_REMOTE
)
449 return get_context_mapping_remote(context
);
453 /* anything that uses button_context_standard */
455 return button_context_standard
;
457 /* contexts with special mapping */
458 case CONTEXT_BOOKMARKSCREEN
:
459 return button_context_bmark
;
462 return button_context_radio
;
464 case CONTEXT_KEYBOARD
:
465 return button_context_keyboard
;
467 case CONTEXT_PITCHSCREEN
:
468 return button_context_pitchscreen
;
470 case CONTEXT_QUICKSCREEN
:
471 return button_context_quickscreen
;
473 case CONTEXT_RECSCREEN
:
474 return button_context_recscreen
;
476 case CONTEXT_SETTINGS
:
477 return button_context_settings
;
479 case CONTEXT_SETTINGS_EQ
:
480 case CONTEXT_SETTINGS_RECTRIGGER
:
481 return button_context_settings_r_is_inc
;
484 case CONTEXT_MAINMENU
:
485 if (global_settings
.hold_lr_for_scroll_in_list
)
486 return button_context_tree_scroll_lr
;
487 /* else fall through to CONTEXT_TREE|CONTEXT_CUSTOM */
488 case CONTEXT_TREE
|CONTEXT_CUSTOM
:
489 return button_context_tree
;
492 return button_context_wps
;
494 case CONTEXT_YESNOSCREEN
:
495 return button_context_yesnoscreen
;