1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 * Copyright (C) 2006 Jonathan Gordon
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 x5 targets
33 /* CONTEXT_CUSTOM's used in this file...
35 CONTEXT_CUSTOM|CONTEXT_TREE = the standard list/tree defines (without directions)
40 /** Keep things alphabetized for easy reference but standard contexts can
41 ** be first and sub-alphebetized.
44 /** Standard Button Contexts **/
45 static const struct button_mapping button_context_standard
[] = {
46 { ACTION_STD_PREV
, BUTTON_UP
, BUTTON_NONE
},
47 { ACTION_STD_PREVREPEAT
, BUTTON_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
48 { ACTION_STD_NEXT
, BUTTON_DOWN
, BUTTON_NONE
},
49 { ACTION_STD_NEXTREPEAT
, BUTTON_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
51 { ACTION_STD_CONTEXT
, BUTTON_SELECT
|BUTTON_REPEAT
, BUTTON_SELECT
},
52 { ACTION_STD_CANCEL
, BUTTON_LEFT
, BUTTON_NONE
},
53 { ACTION_STD_OK
, BUTTON_RIGHT
, BUTTON_NONE
},
54 { ACTION_STD_OK
, BUTTON_SELECT
|BUTTON_REL
, BUTTON_SELECT
},
55 { ACTION_STD_OK
, BUTTON_PLAY
, BUTTON_NONE
},
56 { ACTION_STD_MENU
, BUTTON_REC
|BUTTON_REL
, BUTTON_REC
},
57 { ACTION_STD_QUICKSCREEN
,BUTTON_REC
|BUTTON_REPEAT
, BUTTON_REC
},
58 { ACTION_STD_CANCEL
, BUTTON_POWER
, BUTTON_NONE
},
61 }; /* button_context_standard */
63 static const struct button_mapping remote_button_context_standard
[] = {
64 { ACTION_STD_PREV
, BUTTON_RC_REW
, BUTTON_NONE
},
65 { ACTION_STD_PREVREPEAT
, BUTTON_RC_REW
|BUTTON_REPEAT
, BUTTON_NONE
},
66 { ACTION_STD_NEXT
, BUTTON_RC_FF
, BUTTON_NONE
},
67 { ACTION_STD_NEXTREPEAT
, BUTTON_RC_FF
|BUTTON_REPEAT
, BUTTON_NONE
},
69 { ACTION_STD_CONTEXT
, BUTTON_RC_PLAY
|BUTTON_REPEAT
, BUTTON_RC_PLAY
},
70 { ACTION_STD_CANCEL
, BUTTON_RC_MODE
, BUTTON_NONE
},
71 { ACTION_STD_OK
, BUTTON_RC_PLAY
|BUTTON_REL
, BUTTON_RC_PLAY
},
72 { ACTION_STD_MENU
, BUTTON_RC_MENU
|BUTTON_REL
, BUTTON_RC_MENU
},
73 { ACTION_STD_QUICKSCREEN
, BUTTON_RC_MENU
|BUTTON_REPEAT
, BUTTON_RC_MENU
},
76 }; /* remote_button_context_standard */
78 /** Bookmark Screen **/
79 static const struct button_mapping button_context_bmark
[] = {
80 { ACTION_BMS_DELETE
, BUTTON_REC
|BUTTON_REPEAT
, BUTTON_REC
},
82 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST
),
83 }; /* button_context_settings_bmark */
85 /** FM Radio Screen **/
86 static const struct button_mapping button_context_radio
[] = {
87 { ACTION_FM_MENU
, BUTTON_SELECT
| BUTTON_REPEAT
, BUTTON_NONE
},
88 { ACTION_FM_PRESET
, BUTTON_SELECT
| BUTTON_REL
, BUTTON_SELECT
},
89 { ACTION_FM_STOP
, BUTTON_POWER
, BUTTON_NONE
},
90 { ACTION_FM_MODE
, BUTTON_PLAY
| BUTTON_REPEAT
, BUTTON_PLAY
},
91 { ACTION_FM_EXIT
, BUTTON_REC
| BUTTON_REL
, BUTTON_REC
},
92 { ACTION_FM_PLAY
, BUTTON_PLAY
| BUTTON_REL
, BUTTON_PLAY
},
93 { ACTION_STD_PREVREPEAT
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
94 { ACTION_STD_NEXT
, BUTTON_RIGHT
, BUTTON_NONE
},
95 { ACTION_STD_NEXTREPEAT
, BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
97 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS
)
98 }; /* button_context_radio */
101 static const struct button_mapping button_context_keyboard
[] = {
102 { ACTION_KBD_LEFT
, BUTTON_LEFT
, BUTTON_NONE
},
103 { ACTION_KBD_LEFT
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
104 { ACTION_KBD_RIGHT
, BUTTON_RIGHT
, BUTTON_NONE
},
105 { ACTION_KBD_RIGHT
, BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
106 { ACTION_KBD_UP
, BUTTON_UP
, BUTTON_NONE
},
107 { ACTION_KBD_UP
, BUTTON_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
108 { ACTION_KBD_DOWN
, BUTTON_DOWN
, BUTTON_NONE
},
109 { ACTION_KBD_DOWN
, BUTTON_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
110 { ACTION_KBD_SELECT
, BUTTON_SELECT
|BUTTON_REL
, BUTTON_SELECT
},
111 { ACTION_KBD_DONE
, BUTTON_PLAY
, BUTTON_NONE
},
112 { ACTION_KBD_ABORT
, BUTTON_REC
, BUTTON_NONE
},
115 }; /* button_context_keyboard */
117 static const struct button_mapping remote_button_context_keyboard
[] = {
118 { ACTION_KBD_LEFT
, BUTTON_RC_REW
, BUTTON_NONE
},
119 { ACTION_KBD_LEFT
, BUTTON_RC_REW
|BUTTON_REPEAT
, BUTTON_NONE
},
120 { ACTION_KBD_RIGHT
, BUTTON_RC_FF
, BUTTON_NONE
},
121 { ACTION_KBD_RIGHT
, BUTTON_RC_FF
|BUTTON_REPEAT
, BUTTON_NONE
},
122 { ACTION_KBD_SELECT_REM
, BUTTON_RC_REC
|BUTTON_REL
, BUTTON_NONE
},
123 { ACTION_KBD_SELECT_REM
, BUTTON_RC_MENU
|BUTTON_REL
, BUTTON_NONE
},
124 { ACTION_KBD_DONE
, BUTTON_RC_PLAY
|BUTTON_REPEAT
, BUTTON_NONE
},
125 { ACTION_KBD_ABORT
, BUTTON_RC_MODE
, BUTTON_NONE
},
126 { ACTION_KBD_UP
, BUTTON_RC_VOL_DOWN
, BUTTON_NONE
},
127 { ACTION_KBD_UP
, BUTTON_RC_VOL_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
128 { ACTION_KBD_DOWN
, BUTTON_RC_VOL_UP
, BUTTON_NONE
},
129 { ACTION_KBD_DOWN
, BUTTON_RC_VOL_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
132 }; /* button_context_keyboard_h100remote */
134 static const struct button_mapping remote_button_context_mainmenu
[] = {
135 { ACTION_STD_CANCEL
, BUTTON_RC_VOL_DOWN
, BUTTON_NONE
},
136 { ACTION_STD_OK
, BUTTON_RC_VOL_UP
, BUTTON_NONE
},
138 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
139 }; /* remote_button_context_mainmenu */
142 static const struct button_mapping button_context_pitchscreen
[] = {
143 { ACTION_PS_INC_SMALL
, BUTTON_UP
, BUTTON_NONE
},
144 { ACTION_PS_INC_BIG
, BUTTON_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
145 { ACTION_PS_DEC_SMALL
, BUTTON_DOWN
, BUTTON_NONE
},
146 { ACTION_PS_DEC_BIG
, BUTTON_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
147 { ACTION_PS_NUDGE_LEFT
, BUTTON_LEFT
, BUTTON_NONE
},
148 { ACTION_PS_NUDGE_LEFTOFF
, BUTTON_LEFT
|BUTTON_REL
, BUTTON_NONE
},
149 { ACTION_PS_NUDGE_RIGHT
, BUTTON_RIGHT
, BUTTON_NONE
},
150 { ACTION_PS_NUDGE_RIGHTOFF
, BUTTON_RIGHT
|BUTTON_REL
, BUTTON_NONE
},
151 { ACTION_PS_TOGGLE_MODE
, BUTTON_SELECT
, BUTTON_NONE
},
152 { ACTION_PS_RESET
, BUTTON_POWER
, BUTTON_NONE
},
153 { ACTION_PS_EXIT
, BUTTON_PLAY
, BUTTON_NONE
},
155 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
156 }; /* button_context_pitchscreen */
158 static const struct button_mapping remote_button_context_pitchscreen
[] = {
159 { ACTION_PS_INC_SMALL
, BUTTON_RC_VOL_UP
, BUTTON_NONE
},
160 { ACTION_PS_INC_BIG
, BUTTON_RC_VOL_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
161 { ACTION_PS_DEC_SMALL
, BUTTON_RC_VOL_DOWN
, BUTTON_NONE
},
162 { ACTION_PS_DEC_BIG
, BUTTON_RC_VOL_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
163 { ACTION_PS_NUDGE_LEFT
, BUTTON_RC_REW
, BUTTON_NONE
},
164 { ACTION_PS_NUDGE_LEFTOFF
, BUTTON_RC_REW
|BUTTON_REL
, BUTTON_NONE
},
165 { ACTION_PS_NUDGE_RIGHT
, BUTTON_RC_FF
, BUTTON_NONE
},
166 { ACTION_PS_NUDGE_RIGHTOFF
, BUTTON_RC_FF
|BUTTON_REL
, BUTTON_NONE
},
167 { ACTION_PS_RESET
, BUTTON_RC_MODE
, BUTTON_NONE
},
168 { ACTION_PS_EXIT
, BUTTON_RC_PLAY
, BUTTON_NONE
},
170 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
171 }; /* remote_button_context_pitchscreen */
174 static const struct button_mapping button_context_quickscreen
[] = {
175 { ACTION_QS_DOWNINV
, BUTTON_UP
, BUTTON_NONE
},
176 { ACTION_QS_DOWNINV
, BUTTON_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
177 { ACTION_QS_DOWN
, BUTTON_DOWN
, BUTTON_NONE
},
178 { ACTION_QS_DOWN
, BUTTON_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
179 { ACTION_QS_LEFT
, BUTTON_LEFT
, BUTTON_NONE
},
180 { ACTION_QS_LEFT
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
181 { ACTION_QS_RIGHT
, BUTTON_RIGHT
, BUTTON_NONE
},
182 { ACTION_QS_RIGHT
, BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
183 { ACTION_STD_CANCEL
, BUTTON_REC
, BUTTON_NONE
},
185 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
186 }; /* button_context_quickscreen */
188 static const struct button_mapping remote_button_context_quickscreen
[] = {
189 { ACTION_QS_DOWNINV
, BUTTON_RC_VOL_UP
, BUTTON_NONE
},
190 { ACTION_QS_DOWNINV
, BUTTON_RC_VOL_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
191 { ACTION_QS_DOWN
, BUTTON_RC_VOL_DOWN
, BUTTON_NONE
},
192 { ACTION_QS_DOWN
, BUTTON_RC_VOL_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
193 { ACTION_QS_LEFT
, BUTTON_RC_REW
, BUTTON_NONE
},
194 { ACTION_QS_LEFT
, BUTTON_RC_REW
|BUTTON_REPEAT
, BUTTON_NONE
},
195 { ACTION_QS_RIGHT
, BUTTON_RC_FF
, BUTTON_NONE
},
196 { ACTION_QS_RIGHT
, BUTTON_RC_FF
|BUTTON_REPEAT
, BUTTON_NONE
},
198 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
199 }; /* remote_button_context_quickscreen */
201 /** Recording Screen **/
202 static const struct button_mapping button_context_recscreen
[] = {
203 { ACTION_REC_PAUSE
, BUTTON_PLAY
|BUTTON_REL
, BUTTON_PLAY
},
204 { ACTION_STD_CANCEL
, BUTTON_PLAY
|BUTTON_REPEAT
, BUTTON_PLAY
},
205 { ACTION_REC_NEWFILE
, BUTTON_REC
|BUTTON_REL
, BUTTON_REC
},
206 { ACTION_STD_MENU
, BUTTON_REC
|BUTTON_REPEAT
, BUTTON_REC
},
207 { ACTION_SETTINGS_INC
, BUTTON_RIGHT
, BUTTON_NONE
},
208 { ACTION_SETTINGS_INCREPEAT
, BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
209 { ACTION_SETTINGS_DEC
, BUTTON_LEFT
, BUTTON_NONE
},
210 { ACTION_SETTINGS_DECREPEAT
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
212 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
213 }; /* button_context_recscreen */
215 /** Settings - General Mappings **/
216 static const struct button_mapping button_context_settings
[] = {
217 { ACTION_SETTINGS_INC
, BUTTON_UP
, BUTTON_NONE
},
218 { ACTION_SETTINGS_INCREPEAT
, BUTTON_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
219 { ACTION_SETTINGS_DEC
, BUTTON_DOWN
, BUTTON_NONE
},
220 { ACTION_SETTINGS_DECREPEAT
, BUTTON_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
221 { ACTION_STD_PREV
, BUTTON_LEFT
, BUTTON_NONE
},
222 { ACTION_STD_CANCEL
, BUTTON_REC
, BUTTON_NONE
},
224 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
225 }; /* button_context_settings */
227 /** Settings - Using Sliders **/
228 static const struct button_mapping button_context_settings_r_is_inc
[] = {
229 { ACTION_SETTINGS_INC
, BUTTON_RIGHT
, BUTTON_NONE
},
230 { ACTION_SETTINGS_INCREPEAT
, BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
231 { ACTION_SETTINGS_DEC
, BUTTON_LEFT
, BUTTON_NONE
},
232 { ACTION_SETTINGS_DECREPEAT
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
233 { ACTION_STD_PREV
, BUTTON_UP
, BUTTON_NONE
},
234 { ACTION_STD_PREVREPEAT
, BUTTON_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
235 { ACTION_STD_NEXT
, BUTTON_DOWN
, BUTTON_NONE
},
236 { ACTION_STD_NEXTREPEAT
, BUTTON_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
237 { ACTION_STD_CANCEL
, BUTTON_REC
, BUTTON_NONE
},
239 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
240 }; /* button_context_settings_r_is_inc */
242 static const struct button_mapping remote_button_context_settings_r_is_inc
[] = {
243 { ACTION_SETTINGS_INC
, BUTTON_RC_VOL_UP
, BUTTON_NONE
},
244 { ACTION_SETTINGS_INCREPEAT
, BUTTON_RC_VOL_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
245 { ACTION_SETTINGS_DEC
, BUTTON_RC_VOL_DOWN
, BUTTON_NONE
},
246 { ACTION_SETTINGS_DECREPEAT
, BUTTON_RC_VOL_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
247 { ACTION_STD_PREV
, BUTTON_RC_REW
, BUTTON_NONE
},
248 { ACTION_STD_PREVREPEAT
, BUTTON_RC_REW
|BUTTON_REPEAT
, BUTTON_NONE
},
249 { ACTION_STD_NEXT
, BUTTON_RC_FF
, BUTTON_NONE
},
250 { ACTION_STD_NEXTREPEAT
, BUTTON_RC_FF
|BUTTON_REPEAT
, BUTTON_NONE
},
252 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
253 }; /* remote_button_context_settings_r_is_inc */
255 /** Settings - Time/Date **/
256 static const struct button_mapping button_context_settings_time
[] = {
257 { ACTION_STD_PREVREPEAT
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
258 { ACTION_STD_NEXT
, BUTTON_RIGHT
, BUTTON_NONE
},
259 { ACTION_STD_NEXTREPEAT
, BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
261 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS
)
262 }; /* button_context_settings */
265 static const struct button_mapping button_context_tree
[] = {
266 { ACTION_NONE
, BUTTON_PLAY
, BUTTON_NONE
},
267 { ACTION_TREE_WPS
, BUTTON_PLAY
|BUTTON_REL
, BUTTON_PLAY
},
268 { ACTION_TREE_STOP
, BUTTON_PLAY
|BUTTON_REPEAT
, BUTTON_PLAY
},
270 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
271 }; /* button_context_tree */
273 static const struct button_mapping remote_button_context_tree
[] = {
274 { ACTION_STD_CANCEL
, BUTTON_RC_VOL_DOWN
, BUTTON_NONE
},
275 { ACTION_STD_OK
, BUTTON_RC_VOL_UP
, BUTTON_NONE
},
276 { ACTION_NONE
, BUTTON_RC_MODE
, BUTTON_NONE
},
277 { ACTION_TREE_WPS
, BUTTON_RC_MODE
|BUTTON_REL
, BUTTON_RC_MODE
},
279 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
280 }; /* remote_button_context_tree */
282 static const struct button_mapping button_context_tree_scroll_lr
[] = {
283 { ACTION_NONE
, BUTTON_LEFT
, BUTTON_NONE
},
284 { ACTION_STD_CANCEL
, BUTTON_LEFT
|BUTTON_REL
, BUTTON_LEFT
},
285 { ACTION_TREE_ROOT_INIT
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_LEFT
},
286 { ACTION_TREE_PGLEFT
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
287 { ACTION_TREE_PGLEFT
, BUTTON_LEFT
|BUTTON_REL
, BUTTON_LEFT
|BUTTON_REPEAT
},
288 { ACTION_NONE
, BUTTON_RIGHT
, BUTTON_NONE
},
289 { ACTION_STD_OK
, BUTTON_RIGHT
|BUTTON_REL
, BUTTON_RIGHT
},
290 { ACTION_TREE_PGRIGHT
, BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
291 { ACTION_TREE_PGRIGHT
, BUTTON_RIGHT
|BUTTON_REL
, BUTTON_RIGHT
|BUTTON_REPEAT
},
293 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM
|CONTEXT_TREE
),
294 }; /* button_context_tree_scroll_lr */
296 /** While-Playing Screen (WPS) **/
297 static const struct button_mapping button_context_wps
[] = {
298 { ACTION_WPS_PLAY
, BUTTON_PLAY
|BUTTON_REL
, BUTTON_PLAY
},
299 { ACTION_WPS_STOP
, BUTTON_PLAY
|BUTTON_REPEAT
, BUTTON_PLAY
},
300 { ACTION_WPS_SKIPPREV
, BUTTON_LEFT
|BUTTON_REL
, BUTTON_LEFT
},
301 { ACTION_WPS_SEEKBACK
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
302 { ACTION_WPS_STOPSEEK
, BUTTON_LEFT
|BUTTON_REL
, BUTTON_LEFT
|BUTTON_REPEAT
},
303 { ACTION_WPS_SKIPNEXT
, BUTTON_RIGHT
|BUTTON_REL
, BUTTON_RIGHT
},
304 { ACTION_WPS_SEEKFWD
, BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
305 { ACTION_WPS_STOPSEEK
, BUTTON_RIGHT
|BUTTON_REL
, BUTTON_RIGHT
|BUTTON_REPEAT
},
307 { ACTION_WPS_VOLDOWN
, BUTTON_DOWN
, BUTTON_NONE
},
308 { ACTION_WPS_VOLDOWN
, BUTTON_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
309 { ACTION_WPS_VOLUP
, BUTTON_UP
, BUTTON_NONE
},
310 { ACTION_WPS_VOLUP
, BUTTON_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
312 { ACTION_WPS_BROWSE
, BUTTON_SELECT
|BUTTON_REL
, BUTTON_SELECT
},
313 { ACTION_WPS_CONTEXT
, BUTTON_SELECT
|BUTTON_REPEAT
, BUTTON_SELECT
},
314 { ACTION_WPS_MENU
, BUTTON_REC
|BUTTON_REL
, BUTTON_REC
},
315 { ACTION_WPS_QUICKSCREEN
, BUTTON_REC
|BUTTON_REPEAT
, BUTTON_REC
},
318 }; /* button_context_wps */
320 static const struct button_mapping remote_button_context_wps
[] = {
321 { ACTION_WPS_PLAY
, BUTTON_RC_PLAY
|BUTTON_REL
, BUTTON_RC_PLAY
},
322 { ACTION_WPS_STOP
, BUTTON_RC_PLAY
|BUTTON_REPEAT
, BUTTON_RC_PLAY
},
323 { ACTION_WPS_SKIPPREV
, BUTTON_RC_REW
|BUTTON_REL
, BUTTON_RC_REW
},
324 { ACTION_WPS_SEEKBACK
, BUTTON_RC_REW
|BUTTON_REPEAT
, BUTTON_NONE
},
325 { ACTION_WPS_STOPSEEK
, BUTTON_RC_REW
|BUTTON_REL
, BUTTON_RC_REW
|BUTTON_REPEAT
},
326 { ACTION_WPS_SKIPNEXT
, BUTTON_RC_FF
|BUTTON_REL
, BUTTON_RC_FF
},
327 { ACTION_WPS_SEEKFWD
, BUTTON_RC_FF
|BUTTON_REPEAT
, BUTTON_NONE
},
328 { ACTION_WPS_STOPSEEK
, BUTTON_RC_FF
|BUTTON_REL
, BUTTON_RC_FF
|BUTTON_REPEAT
},
330 { ACTION_WPS_VOLDOWN
, BUTTON_RC_VOL_DOWN
, BUTTON_NONE
},
331 { ACTION_WPS_VOLDOWN
, BUTTON_RC_VOL_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
332 { ACTION_WPS_VOLUP
, BUTTON_RC_VOL_UP
, BUTTON_NONE
},
333 { ACTION_WPS_VOLUP
, BUTTON_RC_VOL_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
335 { ACTION_WPS_BROWSE
, BUTTON_RC_MODE
|BUTTON_REL
, BUTTON_RC_MODE
},
336 { ACTION_WPS_CONTEXT
, BUTTON_RC_MODE
|BUTTON_REPEAT
, BUTTON_RC_MODE
},
337 { ACTION_WPS_MENU
, BUTTON_RC_MENU
|BUTTON_REL
, BUTTON_RC_MENU
},
338 { ACTION_WPS_QUICKSCREEN
, BUTTON_RC_MENU
|BUTTON_REPEAT
, BUTTON_RC_MENU
},
340 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
341 }; /* remote_button_context_wps */
343 /** Yes/No Screen **/
344 static const struct button_mapping button_context_yesnoscreen
[] = {
345 { ACTION_YESNO_ACCEPT
, BUTTON_SELECT
, BUTTON_NONE
},
347 }; /* button_context_settings_yesnoscreen */
349 static const struct button_mapping remote_button_context_yesnoscreen
[] = {
350 { ACTION_YESNO_ACCEPT
, BUTTON_RC_PLAY
, BUTTON_NONE
},
352 }; /* remote_button_context_settings_yesnoscreen */
355 static const struct button_mapping
* get_context_mapping_remote( int context
)
357 context
^= CONTEXT_REMOTE
;
361 /* anything that uses remote_button_context_standard */
363 return remote_button_context_standard
;
365 /* remote contexts with special mapping */
366 case CONTEXT_KEYBOARD
:
367 return remote_button_context_keyboard
;
369 case CONTEXT_MAINMENU
:
370 return remote_button_context_mainmenu
;
372 case CONTEXT_PITCHSCREEN
:
373 return remote_button_context_pitchscreen
;
375 case CONTEXT_QUICKSCREEN
:
376 return remote_button_context_quickscreen
;
378 case CONTEXT_SETTINGS_COLOURCHOOSER
:
379 case CONTEXT_SETTINGS_EQ
:
380 case CONTEXT_SETTINGS_TIME
:
381 return remote_button_context_settings_r_is_inc
;
384 return remote_button_context_tree
;
387 return remote_button_context_wps
;
389 case CONTEXT_YESNOSCREEN
:
390 return remote_button_context_yesnoscreen
;
394 const struct button_mapping
* get_context_mapping( int context
)
396 if (context
& CONTEXT_REMOTE
)
397 return get_context_mapping_remote(context
);
401 /* anything that uses button_context_standard */
405 return button_context_standard
;
407 /* contexts with special mapping */
408 case CONTEXT_BOOKMARKSCREEN
:
409 return button_context_bmark
;
412 return button_context_radio
;
414 case CONTEXT_KEYBOARD
:
415 return button_context_keyboard
;
418 case CONTEXT_PITCHSCREEN
:
419 return button_context_pitchscreen
;
421 case CONTEXT_QUICKSCREEN
:
422 return button_context_quickscreen
;
424 case CONTEXT_RECSCREEN
:
425 return button_context_recscreen
;
427 case CONTEXT_SETTINGS
:
428 return button_context_settings
;
430 case CONTEXT_SETTINGS_COLOURCHOOSER
:
431 case CONTEXT_SETTINGS_EQ
:
432 case CONTEXT_SETTINGS_RECTRIGGER
:
433 return button_context_settings_r_is_inc
;
435 case CONTEXT_SETTINGS_TIME
:
436 return button_context_settings_time
;
439 case CONTEXT_MAINMENU
:
440 if (global_settings
.hold_lr_for_scroll_in_list
)
441 return button_context_tree_scroll_lr
;
442 /* else fall through to CONTEXT_TREE|CONTEXT_CUSTOM */
443 case CONTEXT_TREE
|CONTEXT_CUSTOM
:
444 return button_context_tree
;
447 return button_context_wps
;
449 case CONTEXT_YESNOSCREEN
:
450 return button_context_yesnoscreen
;