1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 * Copyright (C) 2009 Bob Cousins
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 ****************************************************************************/
22 /* Button Code Definitions for the Mini2440 target
23 * based on Toshiba Gigabeat F keymap
35 * The format of the list is as follows
36 * { Action Code, Button code, Prereq button code }
37 * if there's no need to check the previous button's value, use BUTTON_NONE
38 * Insert LAST_ITEM_IN_LIST at the end of each mapping
41 /* CONTEXT_CUSTOM's used in this file...
43 CONTEXT_CUSTOM|CONTEXT_TREE = the standard list/tree defines (without directions)
44 CONTEXT_CUSTOM|CONTEXT_SETTINGS = the direction keys for the eq/col picker screens
45 i.e where up/down is inc/dec
46 CONTEXT_SETTINGS = up/down is prev/next, l/r is inc/dec
51 static const struct button_mapping button_context_standard
[] = {
52 { ACTION_STD_PREV
, BUTTON_UP
, BUTTON_NONE
},
53 { ACTION_STD_PREVREPEAT
, BUTTON_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
54 { ACTION_STD_NEXT
, BUTTON_DOWN
, BUTTON_NONE
},
55 { ACTION_STD_NEXTREPEAT
, BUTTON_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
57 { ACTION_STD_CANCEL
, BUTTON_LEFT
, BUTTON_NONE
},
58 { ACTION_STD_CANCEL
, BUTTON_POWER
, BUTTON_NONE
},
60 { ACTION_STD_CONTEXT
, BUTTON_SELECT
|BUTTON_REPEAT
,BUTTON_SELECT
},
62 { ACTION_STD_QUICKSCREEN
, BUTTON_MENU
|BUTTON_REPEAT
, BUTTON_MENU
},
63 { ACTION_STD_MENU
, BUTTON_MENU
|BUTTON_REL
, BUTTON_MENU
},
65 { ACTION_STD_OK
, BUTTON_SELECT
|BUTTON_REL
, BUTTON_SELECT
},
66 { ACTION_STD_OK
, BUTTON_RIGHT
, BUTTON_NONE
},
69 }; /* button_context_standard */
72 static const struct button_mapping button_context_wps
[] = {
73 { ACTION_WPS_PLAY
, BUTTON_A
|BUTTON_REL
, BUTTON_A
},
74 { ACTION_WPS_STOP
, BUTTON_POWER
|BUTTON_REL
, BUTTON_POWER
},
76 { ACTION_WPS_SKIPNEXT
, BUTTON_RIGHT
|BUTTON_REL
, BUTTON_RIGHT
},
77 { ACTION_WPS_SKIPPREV
, BUTTON_LEFT
|BUTTON_REL
, BUTTON_LEFT
},
79 { ACTION_WPS_SEEKBACK
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
80 { ACTION_WPS_SEEKFWD
, BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
81 { ACTION_WPS_STOPSEEK
, BUTTON_LEFT
|BUTTON_REL
, BUTTON_LEFT
|BUTTON_REPEAT
},
82 { ACTION_WPS_STOPSEEK
, BUTTON_RIGHT
|BUTTON_REL
, BUTTON_RIGHT
|BUTTON_REPEAT
},
84 { ACTION_WPS_ABSETB_NEXTDIR
,BUTTON_A
|BUTTON_RIGHT
, BUTTON_NONE
},
85 { ACTION_WPS_ABSETA_PREVDIR
,BUTTON_A
|BUTTON_LEFT
, BUTTON_NONE
},
86 { ACTION_WPS_ABRESET
, BUTTON_A
|BUTTON_SELECT
, BUTTON_NONE
},
88 { ACTION_WPS_VOLDOWN
, BUTTON_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
89 { ACTION_WPS_VOLDOWN
, BUTTON_DOWN
, BUTTON_NONE
},
90 { ACTION_WPS_VOLDOWN
, BUTTON_VOL_DOWN
, BUTTON_NONE
},
91 { ACTION_WPS_VOLDOWN
, BUTTON_VOL_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
92 { ACTION_WPS_VOLUP
, BUTTON_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
93 { ACTION_WPS_VOLUP
, BUTTON_UP
, BUTTON_NONE
},
94 { ACTION_WPS_VOLUP
, BUTTON_VOL_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
95 { ACTION_WPS_VOLUP
, BUTTON_VOL_UP
, BUTTON_NONE
},
97 { ACTION_WPS_PITCHSCREEN
, BUTTON_A
|BUTTON_UP
, BUTTON_A
},
98 { ACTION_WPS_VIEW_PLAYLIST
, BUTTON_A
|BUTTON_DOWN
, BUTTON_NONE
},
100 { ACTION_WPS_QUICKSCREEN
, BUTTON_MENU
|BUTTON_REPEAT
, BUTTON_MENU
},
101 { ACTION_WPS_MENU
, BUTTON_MENU
|BUTTON_REL
, BUTTON_MENU
},
102 { ACTION_WPS_CONTEXT
, BUTTON_SELECT
|BUTTON_REPEAT
, BUTTON_SELECT
},
104 { ACTION_WPS_ID3SCREEN
, BUTTON_A
|BUTTON_MENU
, BUTTON_NONE
},
105 { ACTION_WPS_BROWSE
, BUTTON_SELECT
|BUTTON_REL
, BUTTON_SELECT
},
108 }; /* button_context_wps */
110 static const struct button_mapping button_context_list
[] = {
111 { ACTION_LISTTREE_PGUP
, BUTTON_A
|BUTTON_UP
, BUTTON_A
},
112 { ACTION_LISTTREE_PGUP
, BUTTON_UP
|BUTTON_REL
, BUTTON_A
|BUTTON_UP
},
113 { ACTION_LISTTREE_PGUP
, BUTTON_A
|BUTTON_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
114 { ACTION_LISTTREE_PGDOWN
, BUTTON_A
|BUTTON_DOWN
, BUTTON_A
},
115 { ACTION_LISTTREE_PGDOWN
, BUTTON_DOWN
|BUTTON_REL
, BUTTON_A
|BUTTON_DOWN
},
116 { ACTION_LISTTREE_PGDOWN
, BUTTON_A
|BUTTON_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
117 #ifdef HAVE_VOLUME_IN_LIST
118 { ACTION_LIST_VOLUP
, BUTTON_VOL_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
119 { ACTION_LIST_VOLUP
, BUTTON_VOL_UP
, BUTTON_NONE
},
120 { ACTION_LIST_VOLDOWN
, BUTTON_VOL_DOWN
, BUTTON_NONE
},
121 { ACTION_LIST_VOLDOWN
, BUTTON_VOL_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
124 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
125 }; /* button_context_list */
127 static const struct button_mapping button_context_tree
[] = {
128 { ACTION_TREE_WPS
, BUTTON_A
|BUTTON_REL
, BUTTON_A
},
129 { ACTION_TREE_STOP
, BUTTON_POWER
, BUTTON_NONE
},
130 { ACTION_TREE_STOP
, BUTTON_POWER
|BUTTON_REL
, BUTTON_POWER
},
131 { ACTION_TREE_STOP
, BUTTON_POWER
|BUTTON_REPEAT
, BUTTON_NONE
},
133 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST
)
134 }; /* button_context_tree */
136 static const struct button_mapping button_context_listtree_scroll_with_combo
[] = {
137 { ACTION_NONE
, BUTTON_A
, BUTTON_NONE
},
138 { ACTION_TREE_PGLEFT
, BUTTON_A
|BUTTON_LEFT
, BUTTON_A
},
139 { ACTION_TREE_PGLEFT
, BUTTON_LEFT
|BUTTON_REL
, BUTTON_A
|BUTTON_LEFT
},
140 { ACTION_TREE_PGLEFT
, BUTTON_A
|BUTTON_LEFT
, BUTTON_LEFT
|BUTTON_REL
},
141 { ACTION_TREE_ROOT_INIT
, BUTTON_A
|BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_A
|BUTTON_LEFT
},
142 { ACTION_TREE_PGLEFT
, BUTTON_A
|BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
143 { ACTION_TREE_PGRIGHT
, BUTTON_A
|BUTTON_RIGHT
, BUTTON_A
},
144 { ACTION_TREE_PGRIGHT
, BUTTON_RIGHT
|BUTTON_REL
, BUTTON_A
|BUTTON_RIGHT
},
145 { ACTION_TREE_PGRIGHT
, BUTTON_A
|BUTTON_RIGHT
, BUTTON_RIGHT
|BUTTON_REL
},
146 { ACTION_TREE_PGRIGHT
, BUTTON_A
|BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
147 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM
|CONTEXT_TREE
),
150 static const struct button_mapping button_context_listtree_scroll_without_combo
[] = {
151 { ACTION_NONE
, BUTTON_LEFT
, BUTTON_NONE
},
152 { ACTION_STD_CANCEL
, BUTTON_LEFT
|BUTTON_REL
, BUTTON_LEFT
},
153 { ACTION_TREE_ROOT_INIT
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_LEFT
},
154 { ACTION_TREE_PGLEFT
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
155 { ACTION_TREE_PGLEFT
, BUTTON_LEFT
|BUTTON_REL
, BUTTON_LEFT
|BUTTON_REPEAT
},
156 { ACTION_NONE
, BUTTON_RIGHT
, BUTTON_NONE
},
157 { ACTION_STD_OK
, BUTTON_RIGHT
|BUTTON_REL
, BUTTON_RIGHT
},
158 { ACTION_TREE_PGRIGHT
, BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
159 { ACTION_TREE_PGRIGHT
, BUTTON_RIGHT
|BUTTON_REL
, BUTTON_RIGHT
|BUTTON_REPEAT
},
160 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM
|CONTEXT_TREE
),
163 static const struct button_mapping button_context_settings
[] = {
164 { ACTION_SETTINGS_INC
, BUTTON_UP
, BUTTON_NONE
},
165 { ACTION_SETTINGS_INCREPEAT
, BUTTON_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
166 { ACTION_SETTINGS_DEC
, BUTTON_DOWN
, BUTTON_NONE
},
167 { ACTION_SETTINGS_DECREPEAT
, BUTTON_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
168 { ACTION_STD_PREV
, BUTTON_LEFT
, BUTTON_NONE
},
169 { ACTION_STD_PREVREPEAT
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
170 { ACTION_STD_NEXT
, BUTTON_RIGHT
, BUTTON_NONE
},
171 { ACTION_STD_NEXTREPEAT
, BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
172 { ACTION_SETTINGS_RESET
, BUTTON_A
, BUTTON_NONE
},
174 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
175 }; /* button_context_settings */
177 static const struct button_mapping button_context_settings_right_is_inc
[] = {
178 { ACTION_SETTINGS_INC
, BUTTON_RIGHT
, BUTTON_NONE
},
179 { ACTION_SETTINGS_INCREPEAT
, BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
180 { ACTION_SETTINGS_DEC
, BUTTON_LEFT
, BUTTON_NONE
},
181 { ACTION_SETTINGS_DECREPEAT
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
182 { ACTION_STD_PREV
, BUTTON_UP
, BUTTON_NONE
},
183 { ACTION_STD_PREVREPEAT
, BUTTON_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
184 { ACTION_STD_NEXT
, BUTTON_DOWN
, BUTTON_NONE
},
185 { ACTION_STD_NEXTREPEAT
, BUTTON_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
186 { ACTION_SETTINGS_RESET
, BUTTON_A
, BUTTON_NONE
},
188 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
189 }; /* button_context_settingsgraphical */
191 static const struct button_mapping button_context_yesno
[] = {
192 { ACTION_YESNO_ACCEPT
, BUTTON_SELECT
, BUTTON_NONE
},
193 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
194 }; /* button_context_settings_yesno */
196 static const struct button_mapping button_context_colorchooser
[] = {
197 { ACTION_STD_OK
, BUTTON_A
|BUTTON_REL
, BUTTON_NONE
},
198 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM
|CONTEXT_SETTINGS
),
199 }; /* button_context_colorchooser */
201 static const struct button_mapping button_context_eq
[] = {
202 { ACTION_STD_OK
, BUTTON_SELECT
|BUTTON_REL
, BUTTON_NONE
},
203 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM
|CONTEXT_SETTINGS
),
204 }; /* button_context_eq */
206 /** Bookmark Screen **/
207 static const struct button_mapping button_context_bmark
[] = {
208 { ACTION_BMS_DELETE
, BUTTON_A
, BUTTON_NONE
},
210 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST
),
211 }; /* button_context_bmark */
213 static const struct button_mapping button_context_time
[] = {
214 { ACTION_STD_CANCEL
, BUTTON_POWER
, BUTTON_NONE
},
215 { ACTION_STD_OK
, BUTTON_A
, BUTTON_NONE
},
216 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS
),
217 }; /* button_context_time */
219 static const struct button_mapping button_context_quickscreen
[] = {
220 { ACTION_QS_TOP
, BUTTON_UP
, BUTTON_NONE
},
221 { ACTION_QS_TOP
, BUTTON_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
222 { ACTION_QS_DOWN
, BUTTON_DOWN
, BUTTON_NONE
},
223 { ACTION_QS_DOWN
, BUTTON_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
224 { ACTION_QS_LEFT
, BUTTON_LEFT
, BUTTON_NONE
},
225 { ACTION_QS_LEFT
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
226 { ACTION_QS_RIGHT
, BUTTON_RIGHT
, BUTTON_NONE
},
227 { ACTION_QS_RIGHT
, BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
228 { ACTION_STD_CANCEL
, BUTTON_MENU
, BUTTON_NONE
},
230 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
231 }; /* button_context_quickscreen */
233 static const struct button_mapping button_context_pitchscreen
[] = {
234 { ACTION_PS_INC_SMALL
, BUTTON_UP
, BUTTON_NONE
},
235 { ACTION_PS_INC_BIG
, BUTTON_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
236 { ACTION_PS_DEC_SMALL
, BUTTON_DOWN
, BUTTON_NONE
},
237 { ACTION_PS_DEC_BIG
, BUTTON_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
238 { ACTION_PS_NUDGE_LEFT
, BUTTON_LEFT
, BUTTON_NONE
},
239 { ACTION_PS_NUDGE_LEFTOFF
, BUTTON_LEFT
|BUTTON_REL
, BUTTON_NONE
},
240 { ACTION_PS_NUDGE_RIGHT
, BUTTON_RIGHT
, BUTTON_NONE
},
241 { ACTION_PS_NUDGE_RIGHTOFF
, BUTTON_RIGHT
|BUTTON_REL
, BUTTON_NONE
},
242 { ACTION_PS_TOGGLE_MODE
, BUTTON_MENU
, BUTTON_NONE
},
243 { ACTION_PS_RESET
, BUTTON_A
, BUTTON_NONE
},
244 { ACTION_PS_EXIT
, BUTTON_POWER
, BUTTON_NONE
},
245 { ACTION_PS_SLOWER
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
246 { ACTION_PS_FASTER
, BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
248 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
249 }; /* button_context_pitchcreen */
251 static const struct button_mapping button_context_keyboard
[] = {
252 { ACTION_KBD_LEFT
, BUTTON_LEFT
, BUTTON_NONE
},
253 { ACTION_KBD_LEFT
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
254 { ACTION_KBD_RIGHT
, BUTTON_RIGHT
, BUTTON_NONE
},
255 { ACTION_KBD_RIGHT
, BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
256 { ACTION_KBD_CURSOR_LEFT
, BUTTON_A
|BUTTON_LEFT
, BUTTON_NONE
},
257 { ACTION_KBD_CURSOR_LEFT
, BUTTON_A
|BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
258 { ACTION_KBD_CURSOR_RIGHT
, BUTTON_A
|BUTTON_RIGHT
, BUTTON_NONE
},
259 { ACTION_KBD_CURSOR_RIGHT
, BUTTON_A
|BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
260 { ACTION_KBD_SELECT
, BUTTON_SELECT
, BUTTON_NONE
},
261 { ACTION_KBD_PAGE_FLIP
, BUTTON_A
|BUTTON_MENU
, BUTTON_NONE
},
262 { ACTION_KBD_DONE
, BUTTON_A
|BUTTON_REL
, BUTTON_A
},
263 { ACTION_KBD_ABORT
, BUTTON_POWER
|BUTTON_REL
, BUTTON_POWER
},
264 { ACTION_KBD_BACKSPACE
, BUTTON_MENU
, BUTTON_NONE
},
265 { ACTION_KBD_BACKSPACE
, BUTTON_MENU
|BUTTON_REPEAT
, BUTTON_NONE
},
266 { ACTION_KBD_UP
, BUTTON_UP
, BUTTON_NONE
},
267 { ACTION_KBD_UP
, BUTTON_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
268 { ACTION_KBD_DOWN
, BUTTON_DOWN
, BUTTON_NONE
},
269 { ACTION_KBD_DOWN
, BUTTON_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
270 { ACTION_KBD_MORSE_INPUT
, BUTTON_A
|BUTTON_POWER
, BUTTON_NONE
},
271 { ACTION_KBD_MORSE_SELECT
, BUTTON_SELECT
|BUTTON_REL
, BUTTON_NONE
},
274 }; /* button_context_keyboard */
276 #ifdef HAVE_MINI2440_REMOTE
277 /*****************************************************************************
278 * Remote control mappings
279 *****************************************************************************/
281 static const struct button_mapping remote_button_context_standard
[] = {
282 { ACTION_STD_PREV
, BUTTON_RC_VOL_UP
, BUTTON_NONE
},
283 { ACTION_STD_PREVREPEAT
, BUTTON_RC_VOL_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
284 { ACTION_STD_NEXT
, BUTTON_RC_VOL_DOWN
, BUTTON_NONE
},
285 { ACTION_STD_NEXTREPEAT
, BUTTON_RC_VOL_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
286 { ACTION_STD_CANCEL
, BUTTON_RC_REW
, BUTTON_NONE
},
287 { ACTION_STD_OK
, BUTTON_RC_FF
|BUTTON_REL
, BUTTON_RC_FF
},
288 { ACTION_STD_CONTEXT
, BUTTON_RC_FF
|BUTTON_REPEAT
, BUTTON_RC_FF
},
289 { ACTION_STD_MENU
, BUTTON_RC_DSP
, BUTTON_NONE
},
294 static const struct button_mapping remote_button_context_wps
[] = {
295 { ACTION_WPS_PLAY
, BUTTON_RC_PLAY
, BUTTON_NONE
},
297 { ACTION_WPS_SKIPNEXT
, BUTTON_RC_FF
|BUTTON_REL
, BUTTON_RC_FF
},
298 { ACTION_WPS_SKIPPREV
, BUTTON_RC_REW
|BUTTON_REL
, BUTTON_RC_REW
},
300 { ACTION_WPS_SEEKBACK
, BUTTON_RC_REW
|BUTTON_REPEAT
, BUTTON_NONE
},
301 { ACTION_WPS_SEEKFWD
, BUTTON_RC_FF
|BUTTON_REPEAT
, BUTTON_NONE
},
302 { ACTION_WPS_STOPSEEK
, BUTTON_RC_REW
|BUTTON_REL
, BUTTON_RC_REW
|BUTTON_REPEAT
},
303 { ACTION_WPS_STOPSEEK
, BUTTON_RC_FF
|BUTTON_REL
, BUTTON_RC_FF
|BUTTON_REPEAT
},
305 { ACTION_WPS_STOP
, BUTTON_RC_PLAY
|BUTTON_REPEAT
, BUTTON_RC_PLAY
},
306 { ACTION_WPS_MENU
, BUTTON_RC_DSP
, BUTTON_NONE
},
308 { ACTION_WPS_VOLDOWN
, BUTTON_RC_VOL_DOWN
, BUTTON_NONE
},
309 { ACTION_WPS_VOLDOWN
, BUTTON_RC_VOL_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
310 { ACTION_WPS_VOLUP
, BUTTON_RC_VOL_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
311 { ACTION_WPS_VOLUP
, BUTTON_RC_VOL_UP
, BUTTON_NONE
},
313 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
316 static const struct button_mapping remote_button_context_tree
[] = {
317 { ACTION_TREE_WPS
, BUTTON_RC_PLAY
|BUTTON_REL
, BUTTON_RC_PLAY
},
318 { ACTION_TREE_STOP
, BUTTON_RC_PLAY
|BUTTON_REPEAT
, BUTTON_RC_PLAY
},
319 { ACTION_STD_CANCEL
, BUTTON_RC_REW
|BUTTON_REPEAT
, BUTTON_NONE
},
321 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
324 static const struct button_mapping
* get_context_mapping_remote( int context
)
326 context
^= CONTEXT_REMOTE
;
331 return remote_button_context_wps
;
332 case CONTEXT_MAINMENU
:
334 return remote_button_context_tree
;
336 return remote_button_context_standard
;
340 const struct button_mapping
* target_get_context_mapping(int context
)
342 #ifdef HAVE_MINI2440_REMOTE
343 if (context
&CONTEXT_REMOTE
)
344 return get_context_mapping_remote(context
);
349 return button_context_standard
;
351 return button_context_wps
;
354 return button_context_list
;
355 case CONTEXT_MAINMENU
:
357 if (global_settings
.hold_lr_for_scroll_in_list
)
358 return button_context_listtree_scroll_without_combo
;
360 return button_context_listtree_scroll_with_combo
;
361 case CONTEXT_CUSTOM
|CONTEXT_TREE
:
362 return button_context_tree
;
364 case CONTEXT_SETTINGS
:
365 return button_context_settings
;
366 case CONTEXT_CUSTOM
|CONTEXT_SETTINGS
:
367 return button_context_settings_right_is_inc
;
369 case CONTEXT_SETTINGS_COLOURCHOOSER
:
370 return button_context_colorchooser
;
371 case CONTEXT_SETTINGS_EQ
:
372 return button_context_eq
;
374 case CONTEXT_SETTINGS_TIME
:
375 return button_context_time
;
377 case CONTEXT_YESNOSCREEN
:
378 return button_context_yesno
;
379 case CONTEXT_BOOKMARKSCREEN
:
380 return button_context_bmark
;
381 case CONTEXT_QUICKSCREEN
:
382 return button_context_quickscreen
;
383 case CONTEXT_PITCHSCREEN
:
384 return button_context_pitchscreen
;
385 case CONTEXT_KEYBOARD
:
386 return button_context_keyboard
;
388 return button_context_standard
;