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_TOP
, BUTTON_VOL_UP
, BUTTON_NONE
},
192 { ACTION_QS_TOP
, 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_TOP
, BUTTON_RC_VOL_UP
, BUTTON_NONE
},
206 { ACTION_QS_TOP
, 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
},
294 { ACTION_TREE_HOTKEY
, BUTTON_REC
|BUTTON_MODE
, BUTTON_REC
},
296 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
297 }; /* button_context_tree */
299 static const struct button_mapping remote_button_context_tree
[] = {
300 { ACTION_NONE
, BUTTON_RC_PLAY
, BUTTON_NONE
},
301 { ACTION_TREE_WPS
, BUTTON_RC_PLAY
|BUTTON_REL
, BUTTON_RC_PLAY
},
302 { ACTION_TREE_STOP
, BUTTON_RC_PLAY
|BUTTON_REPEAT
, BUTTON_RC_PLAY
},
304 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
305 }; /* remote_button_context_tree */
307 static const struct button_mapping button_context_tree_scroll_lr
[] = {
308 { ACTION_NONE
, BUTTON_LEFT
, BUTTON_NONE
},
309 { ACTION_STD_CANCEL
, BUTTON_LEFT
|BUTTON_REL
, BUTTON_LEFT
},
310 { ACTION_TREE_ROOT_INIT
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_LEFT
},
311 { ACTION_TREE_PGLEFT
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
312 { ACTION_TREE_PGLEFT
, BUTTON_LEFT
|BUTTON_REL
, BUTTON_LEFT
|BUTTON_REPEAT
},
313 { ACTION_NONE
, BUTTON_RIGHT
, BUTTON_NONE
},
314 { ACTION_STD_OK
, BUTTON_RIGHT
|BUTTON_REL
, BUTTON_RIGHT
},
315 { ACTION_TREE_PGRIGHT
, BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
316 { ACTION_TREE_PGRIGHT
, BUTTON_RIGHT
|BUTTON_REL
, BUTTON_RIGHT
|BUTTON_REPEAT
},
318 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM
|CONTEXT_TREE
),
319 }; /* button_context_tree_scroll_lr */
321 static const struct button_mapping remote_button_context_tree_scroll_lr
[] = {
322 { ACTION_NONE
, BUTTON_RC_REW
, BUTTON_NONE
},
323 { ACTION_STD_CANCEL
, BUTTON_RC_REW
|BUTTON_REL
, BUTTON_RC_REW
},
324 { ACTION_TREE_ROOT_INIT
, BUTTON_RC_REW
|BUTTON_REPEAT
, BUTTON_RC_REW
},
325 { ACTION_TREE_PGLEFT
, BUTTON_RC_REW
|BUTTON_REPEAT
, BUTTON_NONE
},
326 { ACTION_TREE_PGLEFT
, BUTTON_RC_REW
|BUTTON_REL
, BUTTON_RC_REW
|BUTTON_REPEAT
},
327 { ACTION_NONE
, BUTTON_RC_FF
, BUTTON_NONE
},
328 { ACTION_STD_OK
, BUTTON_RC_FF
|BUTTON_REL
, BUTTON_RC_FF
},
329 { ACTION_TREE_PGRIGHT
, BUTTON_RC_FF
|BUTTON_REPEAT
, BUTTON_NONE
},
330 { ACTION_TREE_PGRIGHT
, BUTTON_RC_FF
|BUTTON_REL
, BUTTON_RC_FF
|BUTTON_REPEAT
},
332 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM
|CONTEXT_TREE
),
333 }; /* remote_button_context_tree_scroll_lr */
335 /** While-Playing Screen (WPS) **/
336 static const struct button_mapping button_context_wps
[] = {
337 { ACTION_WPS_PLAY
, BUTTON_PLAY
|BUTTON_REL
, BUTTON_PLAY
},
338 { ACTION_WPS_STOP
, BUTTON_PLAY
|BUTTON_REPEAT
, BUTTON_PLAY
},
339 { ACTION_WPS_SKIPPREV
, BUTTON_LEFT
|BUTTON_REL
, BUTTON_LEFT
},
340 { ACTION_WPS_SEEKBACK
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
341 { ACTION_WPS_STOPSEEK
, BUTTON_LEFT
|BUTTON_REL
, BUTTON_LEFT
|BUTTON_REPEAT
},
342 { ACTION_WPS_SKIPNEXT
, BUTTON_RIGHT
|BUTTON_REL
, BUTTON_RIGHT
},
343 { ACTION_WPS_SEEKFWD
, BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
344 { ACTION_WPS_STOPSEEK
, BUTTON_RIGHT
|BUTTON_REL
, BUTTON_RIGHT
|BUTTON_REPEAT
},
346 { ACTION_WPS_VOLDOWN
, BUTTON_VOL_DOWN
, BUTTON_NONE
},
347 { ACTION_WPS_VOLDOWN
, BUTTON_VOL_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
348 { ACTION_WPS_VOLUP
, BUTTON_VOL_UP
, BUTTON_NONE
},
349 { ACTION_WPS_VOLUP
, BUTTON_VOL_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
351 { ACTION_WPS_BROWSE
, BUTTON_MODE
|BUTTON_REL
, BUTTON_MODE
},
352 { ACTION_WPS_CONTEXT
, BUTTON_MODE
|BUTTON_REPEAT
, BUTTON_MODE
},
353 { ACTION_WPS_MENU
, BUTTON_REC
|BUTTON_REL
, BUTTON_REC
},
354 { ACTION_WPS_QUICKSCREEN
, BUTTON_REC
|BUTTON_REPEAT
, BUTTON_REC
},
355 { ACTION_WPS_HOTKEY
, BUTTON_REC
|BUTTON_MODE
, BUTTON_REC
},
358 }; /* button_context_wps */
360 static const struct button_mapping remote_button_context_wps
[] = {
361 { ACTION_WPS_PLAY
, BUTTON_RC_PLAY
|BUTTON_REL
, BUTTON_RC_PLAY
},
362 { ACTION_WPS_STOP
, BUTTON_RC_PLAY
|BUTTON_REPEAT
, BUTTON_RC_PLAY
},
363 { ACTION_WPS_SKIPPREV
, BUTTON_RC_REW
|BUTTON_REL
, BUTTON_RC_REW
},
364 { ACTION_WPS_SEEKBACK
, BUTTON_RC_REW
|BUTTON_REPEAT
, BUTTON_NONE
},
365 { ACTION_WPS_STOPSEEK
, BUTTON_RC_REW
|BUTTON_REL
, BUTTON_RC_REW
|BUTTON_REPEAT
},
366 { ACTION_WPS_SKIPNEXT
, BUTTON_RC_FF
|BUTTON_REL
, BUTTON_RC_FF
},
367 { ACTION_WPS_SEEKFWD
, BUTTON_RC_FF
|BUTTON_REPEAT
, BUTTON_NONE
},
368 { ACTION_WPS_STOPSEEK
, BUTTON_RC_FF
|BUTTON_REL
, BUTTON_RC_FF
|BUTTON_REPEAT
},
370 { ACTION_WPS_VOLDOWN
, BUTTON_RC_VOL_DOWN
, BUTTON_NONE
},
371 { ACTION_WPS_VOLDOWN
, BUTTON_RC_VOL_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
372 { ACTION_WPS_VOLUP
, BUTTON_RC_VOL_UP
, BUTTON_NONE
},
373 { ACTION_WPS_VOLUP
, BUTTON_RC_VOL_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
375 { ACTION_WPS_BROWSE
, BUTTON_RC_MODE
|BUTTON_REL
, BUTTON_RC_MODE
},
376 { ACTION_WPS_CONTEXT
, BUTTON_RC_MODE
|BUTTON_REPEAT
, BUTTON_RC_MODE
},
377 { ACTION_WPS_MENU
, BUTTON_RC_MENU
|BUTTON_REL
, BUTTON_RC_MENU
},
378 { ACTION_WPS_QUICKSCREEN
, BUTTON_RC_MENU
|BUTTON_REPEAT
, BUTTON_RC_MENU
},
381 }; /* remote_button_context_wps */
383 /** Yes/No Screen **/
384 static const struct button_mapping button_context_yesnoscreen
[] = {
385 { ACTION_YESNO_ACCEPT
, BUTTON_PLAY
, BUTTON_NONE
},
387 }; /* button_context_yesnoscreen */
389 static const struct button_mapping remote_button_context_yesnoscreen
[] = {
390 { ACTION_YESNO_ACCEPT
, BUTTON_RC_PLAY
, BUTTON_NONE
},
392 }; /* remote_button_context_yesnoscreen */
395 static const struct button_mapping
* get_context_mapping_remote( int context
)
397 context
^= CONTEXT_REMOTE
;
401 /* anything that uses remote_button_context_standard */
403 return remote_button_context_standard
;
405 /* remote contexts with special mapping */
406 case CONTEXT_BOOKMARKSCREEN
:
407 return remote_button_context_bmark
;
410 return remote_button_context_radio
;
412 case CONTEXT_KEYBOARD
:
413 return remote_button_context_keyboard
;
415 case CONTEXT_PITCHSCREEN
:
416 return remote_button_context_pitchscreen
;
418 case CONTEXT_QUICKSCREEN
:
419 return remote_button_context_quickscreen
;
421 case CONTEXT_RECSCREEN
:
422 return remote_button_context_recscreen
;
424 case CONTEXT_SETTINGS
:
425 return remote_button_context_settings
;
427 case CONTEXT_SETTINGS_EQ
:
428 case CONTEXT_SETTINGS_TIME
:
429 return remote_button_context_settings_r_is_inc
;
432 case CONTEXT_MAINMENU
:
433 if (global_settings
.hold_lr_for_scroll_in_list
)
434 return remote_button_context_tree_scroll_lr
;
435 /* else fall through to CONTEXT_TREE|CONTEXT_CUSTOM */
436 case CONTEXT_TREE
|CONTEXT_CUSTOM
:
437 return remote_button_context_tree
;
440 return remote_button_context_wps
;
442 case CONTEXT_YESNOSCREEN
:
443 return remote_button_context_yesnoscreen
;
447 const struct button_mapping
* get_context_mapping(int context
)
449 if (context
& CONTEXT_REMOTE
)
450 return get_context_mapping_remote(context
);
454 /* anything that uses button_context_standard */
456 return button_context_standard
;
458 /* contexts with special mapping */
459 case CONTEXT_BOOKMARKSCREEN
:
460 return button_context_bmark
;
463 return button_context_radio
;
465 case CONTEXT_KEYBOARD
:
466 return button_context_keyboard
;
468 case CONTEXT_PITCHSCREEN
:
469 return button_context_pitchscreen
;
471 case CONTEXT_QUICKSCREEN
:
472 return button_context_quickscreen
;
474 case CONTEXT_RECSCREEN
:
475 return button_context_recscreen
;
477 case CONTEXT_SETTINGS
:
478 return button_context_settings
;
480 case CONTEXT_SETTINGS_EQ
:
481 case CONTEXT_SETTINGS_RECTRIGGER
:
482 return button_context_settings_r_is_inc
;
485 case CONTEXT_MAINMENU
:
486 if (global_settings
.hold_lr_for_scroll_in_list
)
487 return button_context_tree_scroll_lr
;
488 /* else fall through to CONTEXT_TREE|CONTEXT_CUSTOM */
489 case CONTEXT_TREE
|CONTEXT_CUSTOM
:
490 return button_context_tree
;
493 return button_context_wps
;
495 case CONTEXT_YESNOSCREEN
:
496 return button_context_yesnoscreen
;