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 ****************************************************************************/
22 /* Button Code Definitions for the toshiba gigabeat target */
33 * The format of the list is as follows
34 * { Action Code, Button code, Prereq button code }
35 * if there's no need to check the previous button's value, use BUTTON_NONE
36 * Insert LAST_ITEM_IN_LIST at the end of each mapping
39 /* CONTEXT_CUSTOM's used in this file...
41 CONTEXT_CUSTOM|CONTEXT_TREE = the standard list/tree defines (without directions)
42 CONTEXT_CUSTOM|CONTEXT_SETTINGS = the direction keys for the eq/col picker screens
43 i.e where up/down is inc/dec
44 CONTEXT_SETTINGS = up/down is prev/next, l/r is inc/dec
49 static const struct button_mapping button_context_standard
[] = {
50 { ACTION_STD_PREV
, BUTTON_UP
, BUTTON_NONE
},
51 { ACTION_STD_PREVREPEAT
, BUTTON_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
52 { ACTION_STD_NEXT
, BUTTON_DOWN
, BUTTON_NONE
},
53 { ACTION_STD_NEXTREPEAT
, BUTTON_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
55 { ACTION_STD_CANCEL
, BUTTON_LEFT
, BUTTON_NONE
},
56 { ACTION_STD_CANCEL
, BUTTON_POWER
, BUTTON_NONE
},
57 { ACTION_STD_CANCEL
, BUTTON_BACK
, BUTTON_NONE
},
59 { ACTION_STD_CONTEXT
, BUTTON_SELECT
|BUTTON_REPEAT
, BUTTON_SELECT
},
61 { ACTION_STD_QUICKSCREEN
, BUTTON_MENU
|BUTTON_REPEAT
, BUTTON_MENU
},
62 { ACTION_STD_MENU
, BUTTON_MENU
|BUTTON_REL
, BUTTON_MENU
},
64 { ACTION_STD_OK
, BUTTON_SELECT
|BUTTON_REL
, BUTTON_SELECT
},
65 { ACTION_STD_OK
, BUTTON_RIGHT
, BUTTON_NONE
},
68 }; /* button_context_standard */
71 static const struct button_mapping button_context_wps
[] = {
72 { ACTION_WPS_PLAY
, BUTTON_PLAY
|BUTTON_REL
, BUTTON_PLAY
},
73 { ACTION_WPS_STOP
, BUTTON_POWER
|BUTTON_REL
, BUTTON_POWER
},
75 { ACTION_WPS_SKIPNEXT
, BUTTON_RIGHT
|BUTTON_REL
, BUTTON_RIGHT
},
76 { ACTION_WPS_SKIPNEXT
, BUTTON_NEXT
|BUTTON_REL
, BUTTON_NEXT
},
77 { ACTION_WPS_SKIPPREV
, BUTTON_LEFT
|BUTTON_REL
, BUTTON_LEFT
},
78 { ACTION_WPS_SKIPPREV
, BUTTON_PREV
|BUTTON_REL
, BUTTON_PREV
},
80 { ACTION_WPS_SEEKBACK
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
81 { ACTION_WPS_SEEKBACK
, BUTTON_PREV
|BUTTON_REPEAT
, BUTTON_NONE
},
82 { ACTION_WPS_SEEKFWD
, BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
83 { ACTION_WPS_SEEKFWD
, BUTTON_NEXT
|BUTTON_REPEAT
, BUTTON_NONE
},
84 { ACTION_WPS_STOPSEEK
, BUTTON_LEFT
|BUTTON_REL
, BUTTON_LEFT
|BUTTON_REPEAT
},
85 { ACTION_WPS_STOPSEEK
, BUTTON_PREV
|BUTTON_REL
, BUTTON_PREV
|BUTTON_REPEAT
},
86 { ACTION_WPS_STOPSEEK
, BUTTON_RIGHT
|BUTTON_REL
, BUTTON_RIGHT
|BUTTON_REPEAT
},
87 { ACTION_WPS_STOPSEEK
, BUTTON_NEXT
|BUTTON_REL
, BUTTON_NEXT
|BUTTON_REPEAT
},
89 { ACTION_WPS_ABSETB_NEXTDIR
, BUTTON_BACK
|BUTTON_RIGHT
, BUTTON_BACK
},
90 { ACTION_WPS_ABSETA_PREVDIR
, BUTTON_BACK
|BUTTON_LEFT
, BUTTON_BACK
},
91 { ACTION_WPS_ABRESET
, BUTTON_BACK
|BUTTON_SELECT
, BUTTON_BACK
},
93 { ACTION_WPS_VOLDOWN
, BUTTON_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
94 { ACTION_WPS_VOLDOWN
, BUTTON_DOWN
, BUTTON_NONE
},
95 { ACTION_WPS_VOLDOWN
, BUTTON_VOL_DOWN
, BUTTON_NONE
},
96 { ACTION_WPS_VOLDOWN
, BUTTON_VOL_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
97 { ACTION_WPS_VOLUP
, BUTTON_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
98 { ACTION_WPS_VOLUP
, BUTTON_UP
, BUTTON_NONE
},
99 { ACTION_WPS_VOLUP
, BUTTON_VOL_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
100 { ACTION_WPS_VOLUP
, BUTTON_VOL_UP
, BUTTON_NONE
},
102 { ACTION_WPS_PITCHSCREEN
, BUTTON_BACK
|BUTTON_UP
, BUTTON_BACK
},
103 { ACTION_WPS_VIEW_PLAYLIST
, BUTTON_BACK
|BUTTON_DOWN
, BUTTON_NONE
},
105 { ACTION_WPS_QUICKSCREEN
, BUTTON_MENU
|BUTTON_REPEAT
, BUTTON_MENU
},
106 { ACTION_WPS_MENU
, BUTTON_MENU
|BUTTON_REL
, BUTTON_MENU
},
107 { ACTION_WPS_CONTEXT
, BUTTON_SELECT
|BUTTON_REPEAT
, BUTTON_SELECT
},
109 { ACTION_WPS_HOTKEY
, BUTTON_BACK
|BUTTON_MENU
, BUTTON_NONE
},
110 { ACTION_WPS_BROWSE
, BUTTON_SELECT
|BUTTON_REL
, BUTTON_SELECT
},
113 }; /* button_context_wps */
115 static const struct button_mapping button_context_list
[] = {
116 { ACTION_LISTTREE_PGUP
, BUTTON_BACK
|BUTTON_UP
, BUTTON_BACK
},
117 { ACTION_LISTTREE_PGUP
, BUTTON_UP
|BUTTON_REL
, BUTTON_BACK
|BUTTON_UP
},
118 { ACTION_LISTTREE_PGUP
, BUTTON_BACK
|BUTTON_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
119 { ACTION_LISTTREE_PGDOWN
, BUTTON_BACK
|BUTTON_DOWN
, BUTTON_BACK
},
120 { ACTION_LISTTREE_PGDOWN
, BUTTON_DOWN
|BUTTON_REL
, BUTTON_BACK
|BUTTON_DOWN
},
121 { ACTION_LISTTREE_PGDOWN
, BUTTON_BACK
|BUTTON_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
122 #ifdef HAVE_VOLUME_IN_LIST
123 { ACTION_LIST_VOLUP
, BUTTON_VOL_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
124 { ACTION_LIST_VOLUP
, BUTTON_VOL_UP
, BUTTON_NONE
},
125 { ACTION_LIST_VOLDOWN
, BUTTON_VOL_DOWN
, BUTTON_NONE
},
126 { ACTION_LIST_VOLDOWN
, BUTTON_VOL_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
129 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
130 }; /* button_context_list */
132 static const struct button_mapping button_context_tree
[] = {
133 { ACTION_TREE_WPS
, BUTTON_PLAY
|BUTTON_REL
, BUTTON_PLAY
},
134 { ACTION_TREE_STOP
, BUTTON_POWER
, BUTTON_NONE
},
135 { ACTION_TREE_STOP
, BUTTON_POWER
|BUTTON_REL
, BUTTON_POWER
},
136 { ACTION_TREE_STOP
, BUTTON_POWER
|BUTTON_REPEAT
, BUTTON_NONE
},
137 { ACTION_TREE_HOTKEY
,BUTTON_BACK
|BUTTON_MENU
, BUTTON_NONE
},
139 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST
)
140 }; /* button_context_tree */
142 static const struct button_mapping button_context_listtree_scroll_with_combo
[] = {
143 { ACTION_NONE
, BUTTON_BACK
, BUTTON_NONE
},
144 { ACTION_TREE_PGLEFT
, BUTTON_BACK
|BUTTON_LEFT
, BUTTON_BACK
},
145 { ACTION_TREE_PGLEFT
, BUTTON_LEFT
|BUTTON_REL
, BUTTON_BACK
|BUTTON_LEFT
},
146 { ACTION_TREE_PGLEFT
, BUTTON_BACK
|BUTTON_LEFT
, BUTTON_LEFT
|BUTTON_REL
},
147 { ACTION_TREE_ROOT_INIT
, BUTTON_BACK
|BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_BACK
|BUTTON_LEFT
},
148 { ACTION_TREE_PGLEFT
, BUTTON_BACK
|BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
149 { ACTION_TREE_PGRIGHT
, BUTTON_BACK
|BUTTON_RIGHT
, BUTTON_BACK
},
150 { ACTION_TREE_PGRIGHT
, BUTTON_RIGHT
|BUTTON_REL
, BUTTON_BACK
|BUTTON_RIGHT
},
151 { ACTION_TREE_PGRIGHT
, BUTTON_BACK
|BUTTON_RIGHT
, BUTTON_RIGHT
|BUTTON_REL
},
152 { ACTION_TREE_PGRIGHT
, BUTTON_BACK
|BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
153 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM
|CONTEXT_TREE
),
154 }; /* button_context_listtree_scroll_with_combo */
156 static const struct button_mapping button_context_listtree_scroll_without_combo
[] = {
157 { ACTION_NONE
, BUTTON_LEFT
, BUTTON_NONE
},
158 { ACTION_STD_CANCEL
, BUTTON_LEFT
|BUTTON_REL
, BUTTON_LEFT
},
159 { ACTION_TREE_ROOT_INIT
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_LEFT
},
160 { ACTION_TREE_PGLEFT
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
161 { ACTION_TREE_PGLEFT
, BUTTON_LEFT
|BUTTON_REL
, BUTTON_LEFT
|BUTTON_REPEAT
},
162 { ACTION_NONE
, BUTTON_RIGHT
, BUTTON_NONE
},
163 { ACTION_STD_OK
, BUTTON_RIGHT
|BUTTON_REL
, BUTTON_RIGHT
},
164 { ACTION_TREE_PGRIGHT
, BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
165 { ACTION_TREE_PGRIGHT
, BUTTON_RIGHT
|BUTTON_REL
, BUTTON_RIGHT
|BUTTON_REPEAT
},
166 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM
|CONTEXT_TREE
),
167 }; /* button_context_listtree_scroll_without_combo */
169 static const struct button_mapping button_context_settings
[] = {
170 { ACTION_SETTINGS_INC
, BUTTON_UP
, BUTTON_NONE
},
171 { ACTION_SETTINGS_INCREPEAT
, BUTTON_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
172 { ACTION_SETTINGS_DEC
, BUTTON_DOWN
, BUTTON_NONE
},
173 { ACTION_SETTINGS_DECREPEAT
, BUTTON_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
174 { ACTION_STD_PREV
, BUTTON_LEFT
, BUTTON_NONE
},
175 { ACTION_STD_PREVREPEAT
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
176 { ACTION_STD_NEXT
, BUTTON_RIGHT
, BUTTON_NONE
},
177 { ACTION_STD_NEXTREPEAT
, BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
178 { ACTION_SETTINGS_RESET
, BUTTON_BACK
, BUTTON_NONE
},
180 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
181 }; /* button_context_settings */
183 static const struct button_mapping button_context_settings_right_is_inc
[] = {
184 { ACTION_SETTINGS_INC
, BUTTON_RIGHT
, BUTTON_NONE
},
185 { ACTION_SETTINGS_INCREPEAT
, BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
186 { ACTION_SETTINGS_DEC
, BUTTON_LEFT
, BUTTON_NONE
},
187 { ACTION_SETTINGS_DECREPEAT
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
188 { ACTION_STD_PREV
, BUTTON_UP
, BUTTON_NONE
},
189 { ACTION_STD_PREVREPEAT
, BUTTON_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
190 { ACTION_STD_NEXT
, BUTTON_DOWN
, BUTTON_NONE
},
191 { ACTION_STD_NEXTREPEAT
, BUTTON_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
192 { ACTION_SETTINGS_RESET
, BUTTON_BACK
, BUTTON_NONE
},
194 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
195 }; /* button_context_settingsgraphical */
197 static const struct button_mapping button_context_yesno
[] = {
198 { ACTION_YESNO_ACCEPT
, BUTTON_SELECT
, BUTTON_NONE
},
200 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
201 }; /* button_context_settings_yesno */
203 static const struct button_mapping button_context_colorchooser
[] = {
204 { ACTION_STD_OK
, BUTTON_SELECT
|BUTTON_REL
, BUTTON_SELECT
},
205 { ACTION_STD_CANCEL
, BUTTON_BACK
, BUTTON_NONE
},
207 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM
|CONTEXT_SETTINGS
),
208 }; /* button_context_colorchooser */
210 static const struct button_mapping button_context_eq
[] = {
211 { ACTION_STD_OK
, BUTTON_SELECT
|BUTTON_REL
, BUTTON_SELECT
},
213 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM
|CONTEXT_SETTINGS
),
214 }; /* button_context_eq */
216 /** Bookmark Screen **/
217 static const struct button_mapping button_context_bmark
[] = {
218 { ACTION_BMS_DELETE
, BUTTON_BACK
|BUTTON_SELECT
, BUTTON_BACK
},
220 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST
),
221 }; /* button_context_bmark */
223 static const struct button_mapping button_context_time
[] = {
224 { ACTION_STD_CANCEL
, BUTTON_BACK
, BUTTON_NONE
},
225 { ACTION_STD_OK
, BUTTON_PLAY
, BUTTON_NONE
},
227 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS
),
228 }; /* button_context_time */
230 static const struct button_mapping button_context_quickscreen
[] = {
231 { ACTION_QS_TOP
, BUTTON_UP
, BUTTON_NONE
},
232 { ACTION_QS_TOP
, BUTTON_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
233 { ACTION_QS_DOWN
, BUTTON_DOWN
, BUTTON_NONE
},
234 { ACTION_QS_DOWN
, BUTTON_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
235 { ACTION_QS_LEFT
, BUTTON_LEFT
, BUTTON_NONE
},
236 { ACTION_QS_LEFT
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
237 { ACTION_QS_RIGHT
, BUTTON_RIGHT
, BUTTON_NONE
},
238 { ACTION_QS_RIGHT
, BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
239 { ACTION_STD_CANCEL
, BUTTON_MENU
, BUTTON_NONE
},
241 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
242 }; /* button_context_quickscreen */
244 static const struct button_mapping button_context_pitchscreen
[] = {
245 { ACTION_PS_INC_SMALL
, BUTTON_UP
, BUTTON_NONE
},
246 { ACTION_PS_INC_BIG
, BUTTON_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
247 { ACTION_PS_DEC_SMALL
, BUTTON_DOWN
, BUTTON_NONE
},
248 { ACTION_PS_DEC_BIG
, BUTTON_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
249 { ACTION_PS_NUDGE_LEFT
, BUTTON_LEFT
, BUTTON_NONE
},
250 { ACTION_PS_NUDGE_LEFTOFF
, BUTTON_LEFT
|BUTTON_REL
, BUTTON_NONE
},
251 { ACTION_PS_NUDGE_RIGHT
, BUTTON_RIGHT
, BUTTON_NONE
},
252 { ACTION_PS_NUDGE_RIGHTOFF
, BUTTON_RIGHT
|BUTTON_REL
, BUTTON_NONE
},
253 { ACTION_PS_TOGGLE_MODE
, BUTTON_MENU
, BUTTON_NONE
},
254 { ACTION_PS_RESET
, BUTTON_PLAY
, BUTTON_NONE
},
255 { ACTION_PS_EXIT
, BUTTON_BACK
, BUTTON_NONE
},
256 { ACTION_PS_SLOWER
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
257 { ACTION_PS_FASTER
, BUTTON_RIGHT
|BUTTON_REPEAT
,BUTTON_NONE
},
259 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
260 }; /* button_context_pitchcreen */
262 /** Recording Screen **/
263 static const struct button_mapping button_context_recscreen
[] = {
264 { ACTION_REC_PAUSE
, BUTTON_PLAY
|BUTTON_REL
, BUTTON_PLAY
},
265 { ACTION_STD_CANCEL
, BUTTON_BACK
|BUTTON_REL
, BUTTON_BACK
},
266 { ACTION_REC_NEWFILE
, BUTTON_NEXT
|BUTTON_REL
, BUTTON_NEXT
},
267 { ACTION_STD_MENU
, BUTTON_MENU
|BUTTON_REPEAT
, BUTTON_NONE
},
268 { ACTION_SETTINGS_INC
, BUTTON_RIGHT
, BUTTON_NONE
},
269 { ACTION_SETTINGS_INCREPEAT
, BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
270 { ACTION_SETTINGS_DEC
, BUTTON_LEFT
, BUTTON_NONE
},
271 { ACTION_SETTINGS_DECREPEAT
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
272 { ACTION_STD_PREV
, BUTTON_UP
, BUTTON_NONE
},
273 { ACTION_STD_PREV
, BUTTON_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
274 { ACTION_STD_NEXT
, BUTTON_DOWN
, BUTTON_NONE
},
275 { ACTION_STD_NEXT
, BUTTON_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
277 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
278 }; /* button_context_recscreen */
280 static const struct button_mapping button_context_keyboard
[] = {
281 { ACTION_KBD_LEFT
, BUTTON_LEFT
, BUTTON_NONE
},
282 { ACTION_KBD_LEFT
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
283 { ACTION_KBD_RIGHT
, BUTTON_RIGHT
, BUTTON_NONE
},
284 { ACTION_KBD_RIGHT
, BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
285 { ACTION_KBD_CURSOR_LEFT
, BUTTON_PREV
, BUTTON_NONE
},
286 { ACTION_KBD_CURSOR_LEFT
, BUTTON_PREV
|BUTTON_REPEAT
, BUTTON_NONE
},
287 { ACTION_KBD_CURSOR_RIGHT
, BUTTON_NEXT
, BUTTON_NONE
},
288 { ACTION_KBD_CURSOR_RIGHT
, BUTTON_NEXT
|BUTTON_REPEAT
, BUTTON_NONE
},
289 { ACTION_KBD_SELECT
, BUTTON_SELECT
, BUTTON_NONE
},
290 { ACTION_KBD_PAGE_FLIP
, BUTTON_BACK
|BUTTON_MENU
, BUTTON_NONE
},
291 { ACTION_KBD_DONE
, BUTTON_PLAY
|BUTTON_REL
, BUTTON_PLAY
},
292 { ACTION_KBD_ABORT
, BUTTON_BACK
|BUTTON_REL
, BUTTON_BACK
},
293 { ACTION_KBD_BACKSPACE
, BUTTON_MENU
, BUTTON_NONE
},
294 { ACTION_KBD_BACKSPACE
, BUTTON_MENU
|BUTTON_REPEAT
, BUTTON_NONE
},
295 { ACTION_KBD_UP
, BUTTON_UP
, BUTTON_NONE
},
296 { ACTION_KBD_UP
, BUTTON_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
297 { ACTION_KBD_DOWN
, BUTTON_DOWN
, BUTTON_NONE
},
298 { ACTION_KBD_DOWN
, BUTTON_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
299 { ACTION_KBD_MORSE_INPUT
, BUTTON_BACK
|BUTTON_VOL_UP
, BUTTON_NONE
},
300 { ACTION_KBD_MORSE_SELECT
, BUTTON_SELECT
|BUTTON_REL
, BUTTON_NONE
},
303 }; /* button_context_keyboard */
305 static const struct button_mapping button_context_radio
[] = {
306 { ACTION_FM_MENU
, BUTTON_SELECT
| BUTTON_REPEAT
, BUTTON_NONE
},
307 { ACTION_FM_PRESET
, BUTTON_SELECT
| BUTTON_REL
, BUTTON_SELECT
},
308 { ACTION_FM_STOP
, BUTTON_POWER
, BUTTON_NONE
},
309 { ACTION_FM_MODE
, BUTTON_MENU
|BUTTON_REL
, BUTTON_MENU
},
310 { ACTION_FM_EXIT
, BUTTON_BACK
, BUTTON_NONE
},
311 { ACTION_FM_PLAY
, BUTTON_PLAY
, BUTTON_NONE
},
312 { ACTION_SETTINGS_INC
, BUTTON_VOL_UP
, BUTTON_NONE
},
313 { ACTION_SETTINGS_INCREPEAT
, BUTTON_VOL_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
314 { ACTION_SETTINGS_DEC
, BUTTON_VOL_DOWN
, BUTTON_NONE
},
315 { ACTION_SETTINGS_DECREPEAT
, BUTTON_VOL_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
316 { ACTION_FM_QUICKSCREEN
, BUTTON_MENU
|BUTTON_REPEAT
, BUTTON_NONE
},
318 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS
)
319 }; /* button_context_radio */
321 /*****************************************************************************
322 * Remote control mappings
323 *****************************************************************************/
324 static const struct button_mapping remote_button_context_standard
[] = {
325 { ACTION_STD_PREV
, BUTTON_RC_VOL_UP
, BUTTON_NONE
},
326 { ACTION_STD_PREVREPEAT
, BUTTON_RC_VOL_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
327 { ACTION_STD_NEXT
, BUTTON_RC_VOL_DOWN
, BUTTON_NONE
},
328 { ACTION_STD_NEXTREPEAT
, BUTTON_RC_VOL_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
329 { ACTION_STD_CANCEL
, BUTTON_RC_REW
|BUTTON_REL
, BUTTON_RC_DSP
},
330 { ACTION_STD_QUICKSCREEN
, BUTTON_RC_REW
|BUTTON_REPEAT
, BUTTON_RC_REW
},
331 { ACTION_STD_OK
, BUTTON_RC_FF
|BUTTON_REL
, BUTTON_RC_FF
},
332 { ACTION_STD_MENU
, BUTTON_RC_DSP
|BUTTON_REL
, BUTTON_RC_DSP
},
333 { ACTION_STD_CONTEXT
, BUTTON_RC_DSP
|BUTTON_REPEAT
, BUTTON_RC_DSP
},
336 }; /* remote_button_context_standard */
338 static const struct button_mapping remote_button_context_wps
[] = {
339 { ACTION_WPS_PLAY
, BUTTON_RC_PLAY
|BUTTON_REL
, BUTTON_RC_PLAY
},
340 { ACTION_WPS_STOP
, BUTTON_RC_PLAY
|BUTTON_REPEAT
, BUTTON_RC_PLAY
},
341 { ACTION_WPS_SKIPPREV
, BUTTON_RC_REW
|BUTTON_REL
, BUTTON_RC_REW
},
342 { ACTION_WPS_SEEKBACK
, BUTTON_RC_REW
|BUTTON_REPEAT
, BUTTON_NONE
},
343 { ACTION_WPS_STOPSEEK
, BUTTON_RC_REW
|BUTTON_REL
, BUTTON_RC_REW
|BUTTON_REPEAT
},
344 { ACTION_WPS_SEEKFWD
, BUTTON_RC_FF
|BUTTON_REPEAT
, BUTTON_NONE
},
345 { ACTION_WPS_SKIPNEXT
, BUTTON_RC_FF
|BUTTON_REL
, BUTTON_RC_FF
},
346 { ACTION_WPS_STOPSEEK
, BUTTON_RC_FF
|BUTTON_REL
, BUTTON_RC_FF
|BUTTON_REPEAT
},
347 { ACTION_WPS_VOLDOWN
, BUTTON_RC_VOL_DOWN
, BUTTON_NONE
},
348 { ACTION_WPS_VOLDOWN
, BUTTON_RC_VOL_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
349 { ACTION_WPS_VOLUP
, BUTTON_RC_VOL_UP
, BUTTON_NONE
},
350 { ACTION_WPS_VOLUP
, BUTTON_RC_VOL_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
351 { ACTION_WPS_MENU
, BUTTON_RC_DSP
|BUTTON_REL
, BUTTON_RC_DSP
},
352 { ACTION_WPS_CONTEXT
, BUTTON_RC_DSP
|BUTTON_REPEAT
, BUTTON_RC_DSP
},
354 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
355 }; /* remote_button_context_wps */
357 static const struct button_mapping remote_button_context_tree
[] = {
358 { ACTION_TREE_WPS
, BUTTON_RC_PLAY
|BUTTON_REL
, BUTTON_RC_PLAY
},
359 { ACTION_TREE_STOP
, BUTTON_RC_PLAY
|BUTTON_REPEAT
, BUTTON_RC_PLAY
},
360 { ACTION_STD_CANCEL
, BUTTON_RC_REW
|BUTTON_REL
, BUTTON_RC_REW
},
362 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
363 }; /* remote_button_context_tree */
365 static const struct button_mapping remote_button_context_radio
[] = {
366 { ACTION_FM_MODE
, BUTTON_RC_PLAY
|BUTTON_REPEAT
, BUTTON_RC_PLAY
},
367 { ACTION_FM_PLAY
, BUTTON_RC_PLAY
|BUTTON_REL
, BUTTON_RC_PLAY
},
368 { ACTION_STD_PREV
, BUTTON_RC_REW
, BUTTON_NONE
},
369 { ACTION_STD_PREVREPEAT
, BUTTON_RC_REW
|BUTTON_REPEAT
, BUTTON_NONE
},
370 { ACTION_STD_NEXT
, BUTTON_RC_FF
, BUTTON_NONE
},
371 { ACTION_STD_NEXTREPEAT
, BUTTON_RC_FF
|BUTTON_REPEAT
, BUTTON_NONE
},
372 { ACTION_SETTINGS_INC
, BUTTON_RC_VOL_UP
, BUTTON_NONE
},
373 { ACTION_SETTINGS_INCREPEAT
, BUTTON_RC_VOL_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
374 { ACTION_SETTINGS_DEC
, BUTTON_RC_VOL_DOWN
, BUTTON_NONE
},
375 { ACTION_SETTINGS_DECREPEAT
, BUTTON_RC_VOL_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
376 { ACTION_FM_EXIT
, BUTTON_RC_DSP
|BUTTON_REL
, BUTTON_RC_DSP
},
377 { ACTION_FM_STOP
, BUTTON_RC_DSP
|BUTTON_REPEAT
, BUTTON_RC_DSP
},
380 }; /* remote_button_context_radio */
382 static const struct button_mapping remote_button_context_recscreen
[] = {
383 { ACTION_REC_NEWFILE
, BUTTON_RC_PLAY
|BUTTON_REL
, BUTTON_RC_PLAY
},
384 { ACTION_REC_PAUSE
, BUTTON_RC_PLAY
|BUTTON_REPEAT
, BUTTON_RC_PLAY
},
385 { ACTION_STD_CANCEL
, BUTTON_RC_DSP
|BUTTON_REL
, BUTTON_RC_DSP
},
386 { ACTION_STD_MENU
, BUTTON_RC_DSP
|BUTTON_REPEAT
, BUTTON_RC_DSP
},
387 { ACTION_SETTINGS_INC
, BUTTON_RC_FF
, BUTTON_NONE
},
388 { ACTION_SETTINGS_INCREPEAT
, BUTTON_RC_FF
|BUTTON_REPEAT
, BUTTON_NONE
},
389 { ACTION_SETTINGS_DEC
, BUTTON_RC_REW
, BUTTON_NONE
},
390 { ACTION_SETTINGS_DECREPEAT
, BUTTON_RC_REW
|BUTTON_REPEAT
, BUTTON_NONE
},
391 { ACTION_STD_PREV
, BUTTON_RC_VOL_UP
, BUTTON_NONE
},
392 { ACTION_STD_PREV
, BUTTON_RC_VOL_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
393 { ACTION_STD_NEXT
, BUTTON_RC_VOL_DOWN
, BUTTON_NONE
},
394 { ACTION_STD_NEXT
, BUTTON_RC_VOL_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
397 }; /* button_context_recscreen */
399 static const struct button_mapping remote_button_context_time
[] = {
400 { ACTION_SETTINGS_INC
, BUTTON_RC_VOL_UP
, BUTTON_NONE
},
401 { ACTION_SETTINGS_INCREPEAT
, BUTTON_RC_VOL_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
402 { ACTION_SETTINGS_DEC
, BUTTON_RC_VOL_DOWN
, BUTTON_NONE
},
403 { ACTION_SETTINGS_DECREPEAT
, BUTTON_RC_VOL_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
404 { ACTION_STD_PREV
, BUTTON_RC_REW
, BUTTON_NONE
},
405 { ACTION_STD_PREVREPEAT
, BUTTON_RC_REW
|BUTTON_REPEAT
, BUTTON_NONE
},
406 { ACTION_STD_NEXT
, BUTTON_RC_FF
, BUTTON_NONE
},
407 { ACTION_STD_NEXTREPEAT
, BUTTON_RC_FF
|BUTTON_REPEAT
, BUTTON_NONE
},
408 { ACTION_STD_OK
, BUTTON_RC_PLAY
|BUTTON_REL
, BUTTON_RC_PLAY
},
409 { ACTION_STD_CANCEL
, BUTTON_RC_DSP
|BUTTON_REL
, BUTTON_RC_DSP
},
412 }; /* remote_button_context_time */
414 static const struct button_mapping remote_button_context_bmark
[] = {
415 { ACTION_BMS_DELETE
, BUTTON_RC_DSP
|BUTTON_REPEAT
, BUTTON_RC_DSP
},
417 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
418 }; /* remote_button_context_bmark */
420 static const struct button_mapping remote_button_context_yesno
[] = {
421 { ACTION_YESNO_ACCEPT
, BUTTON_RC_PLAY
, BUTTON_NONE
},
423 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
424 }; /* button_context_settings_yesno */
426 static const struct button_mapping remote_button_context_quickscreen
[] = {
427 { ACTION_QS_TOP
, BUTTON_RC_VOL_UP
, BUTTON_NONE
},
428 { ACTION_QS_TOP
, BUTTON_RC_VOL_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
429 { ACTION_QS_DOWN
, BUTTON_RC_VOL_DOWN
, BUTTON_NONE
},
430 { ACTION_QS_DOWN
, BUTTON_RC_VOL_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
431 { ACTION_QS_LEFT
, BUTTON_RC_REW
, BUTTON_NONE
},
432 { ACTION_QS_LEFT
, BUTTON_RC_REW
|BUTTON_REPEAT
, BUTTON_NONE
},
433 { ACTION_QS_RIGHT
, BUTTON_RC_FF
, BUTTON_NONE
},
434 { ACTION_QS_RIGHT
, BUTTON_RC_FF
|BUTTON_REPEAT
, BUTTON_NONE
},
435 { ACTION_STD_CANCEL
, BUTTON_RC_DSP
|BUTTON_REL
, BUTTON_RC_DSP
},
438 }; /* remote_button_context_quickscreen */
440 static const struct button_mapping remote_button_context_pitchscreen
[] = {
441 { ACTION_PS_INC_SMALL
, BUTTON_RC_VOL_UP
, BUTTON_NONE
},
442 { ACTION_PS_INC_BIG
, BUTTON_RC_VOL_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
443 { ACTION_PS_DEC_SMALL
, BUTTON_RC_VOL_DOWN
, BUTTON_NONE
},
444 { ACTION_PS_DEC_BIG
, BUTTON_RC_VOL_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
445 { ACTION_PS_NUDGE_LEFT
, BUTTON_RC_REW
, BUTTON_NONE
},
446 { ACTION_PS_NUDGE_LEFTOFF
, BUTTON_RC_REW
|BUTTON_REL
, BUTTON_NONE
},
447 { ACTION_PS_NUDGE_RIGHT
, BUTTON_RC_FF
, BUTTON_NONE
},
448 { ACTION_PS_NUDGE_RIGHTOFF
, BUTTON_RC_FF
|BUTTON_REL
, BUTTON_NONE
},
449 { ACTION_PS_RESET
, BUTTON_RC_PLAY
|BUTTON_REL
, BUTTON_RC_PLAY
},
450 { ACTION_PS_TOGGLE_MODE
, BUTTON_RC_PLAY
|BUTTON_REPEAT
, BUTTON_RC_PLAY
},
451 { ACTION_PS_EXIT
, BUTTON_RC_DSP
|BUTTON_REL
, BUTTON_RC_DSP
},
452 { ACTION_PS_SLOWER
, BUTTON_RC_REW
|BUTTON_REPEAT
, BUTTON_NONE
},
453 { ACTION_PS_FASTER
, BUTTON_RC_FF
|BUTTON_REPEAT
, BUTTON_NONE
},
456 }; /* remote_button_context_pitchscreen */
458 static const struct button_mapping remote_button_context_right_is_inc
[] = {
459 { ACTION_SETTINGS_INC
, BUTTON_RC_FF
, BUTTON_NONE
},
460 { ACTION_SETTINGS_INCREPEAT
, BUTTON_RC_FF
|BUTTON_REPEAT
, BUTTON_NONE
},
461 { ACTION_SETTINGS_DEC
, BUTTON_RC_REW
, BUTTON_NONE
},
462 { ACTION_SETTINGS_DECREPEAT
, BUTTON_RC_REW
|BUTTON_REPEAT
, BUTTON_NONE
},
463 { ACTION_STD_PREV
, BUTTON_RC_VOL_UP
, BUTTON_NONE
},
464 { ACTION_STD_PREVREPEAT
, BUTTON_RC_VOL_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
465 { ACTION_STD_NEXT
, BUTTON_RC_VOL_DOWN
, BUTTON_NONE
},
466 { ACTION_STD_NEXTREPEAT
, BUTTON_RC_VOL_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
467 { ACTION_STD_OK
, BUTTON_RC_PLAY
|BUTTON_REL
, BUTTON_RC_PLAY
},
468 { ACTION_STD_CANCEL
, BUTTON_RC_DSP
|BUTTON_REL
, BUTTON_RC_DSP
},
471 }; /* remote_button_context_right_is_inc */
473 #ifdef USB_ENABLE_HID
474 static const struct button_mapping button_context_usb_hid
[] = {
475 { ACTION_USB_HID_MODE_SWITCH_NEXT
, BUTTON_POWER
|BUTTON_REL
, BUTTON_POWER
},
476 { ACTION_USB_HID_MODE_SWITCH_PREV
, BUTTON_POWER
|BUTTON_REPEAT
, BUTTON_POWER
},
479 }; /* button_context_usb_hid */
481 static const struct button_mapping button_context_usb_hid_mode_multimedia
[] = {
482 { ACTION_USB_HID_MULTIMEDIA_VOLUME_DOWN
, BUTTON_VOL_DOWN
, BUTTON_NONE
},
483 { ACTION_USB_HID_MULTIMEDIA_VOLUME_DOWN
, BUTTON_VOL_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
484 { ACTION_USB_HID_MULTIMEDIA_VOLUME_UP
, BUTTON_VOL_UP
, BUTTON_NONE
},
485 { ACTION_USB_HID_MULTIMEDIA_VOLUME_UP
, BUTTON_VOL_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
486 { ACTION_USB_HID_MULTIMEDIA_VOLUME_MUTE
, BUTTON_SELECT
|BUTTON_REL
, BUTTON_SELECT
},
487 { ACTION_USB_HID_MULTIMEDIA_VOLUME_MUTE
, BUTTON_BACK
|BUTTON_REL
, BUTTON_BACK
},
488 { ACTION_USB_HID_MULTIMEDIA_PLAYBACK_PLAY_PAUSE
, BUTTON_PLAY
|BUTTON_REL
, BUTTON_PLAY
},
489 { ACTION_USB_HID_MULTIMEDIA_PLAYBACK_PLAY_PAUSE
, BUTTON_UP
|BUTTON_REL
, BUTTON_UP
},
490 { ACTION_USB_HID_MULTIMEDIA_PLAYBACK_STOP
, BUTTON_DOWN
|BUTTON_REL
, BUTTON_DOWN
},
491 { ACTION_USB_HID_MULTIMEDIA_PLAYBACK_STOP
, BUTTON_MENU
|BUTTON_REL
, BUTTON_MENU
},
492 { ACTION_USB_HID_MULTIMEDIA_PLAYBACK_TRACK_PREV
, BUTTON_LEFT
|BUTTON_REL
, BUTTON_LEFT
},
493 { ACTION_USB_HID_MULTIMEDIA_PLAYBACK_TRACK_PREV
, BUTTON_PREV
|BUTTON_REL
, BUTTON_PREV
},
494 { ACTION_USB_HID_MULTIMEDIA_PLAYBACK_TRACK_NEXT
, BUTTON_RIGHT
|BUTTON_REL
, BUTTON_RIGHT
},
495 { ACTION_USB_HID_MULTIMEDIA_PLAYBACK_TRACK_NEXT
, BUTTON_NEXT
|BUTTON_REL
, BUTTON_NEXT
},
497 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_USB_HID
)
498 }; /* button_context_usb_hid_mode_multimedia */
500 static const struct button_mapping button_context_usb_hid_mode_presentation
[] = {
501 { ACTION_USB_HID_PRESENTATION_SLIDESHOW_START
, BUTTON_PLAY
|BUTTON_REL
, BUTTON_PLAY
},
502 { ACTION_USB_HID_PRESENTATION_SLIDESHOW_START
, BUTTON_UP
|BUTTON_REL
, BUTTON_UP
},
503 { ACTION_USB_HID_PRESENTATION_SLIDESHOW_LEAVE
, BUTTON_PLAY
|BUTTON_REPEAT
, BUTTON_PLAY
},
504 { ACTION_USB_HID_PRESENTATION_SLIDESHOW_LEAVE
, BUTTON_UP
|BUTTON_REPEAT
, BUTTON_UP
},
505 { ACTION_USB_HID_PRESENTATION_SLIDE_PREV
, BUTTON_LEFT
|BUTTON_REL
, BUTTON_LEFT
},
506 { ACTION_USB_HID_PRESENTATION_SLIDE_PREV
, BUTTON_PREV
|BUTTON_REL
, BUTTON_PREV
},
507 { ACTION_USB_HID_PRESENTATION_SLIDE_NEXT
, BUTTON_RIGHT
|BUTTON_REL
, BUTTON_RIGHT
},
508 { ACTION_USB_HID_PRESENTATION_SLIDE_NEXT
, BUTTON_NEXT
|BUTTON_REL
, BUTTON_NEXT
},
509 { ACTION_USB_HID_PRESENTATION_SLIDE_FIRST
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_LEFT
},
510 { ACTION_USB_HID_PRESENTATION_SLIDE_FIRST
, BUTTON_PREV
|BUTTON_REPEAT
, BUTTON_PREV
},
511 { ACTION_USB_HID_PRESENTATION_SLIDE_LAST
, BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_RIGHT
},
512 { ACTION_USB_HID_PRESENTATION_SLIDE_LAST
, BUTTON_NEXT
|BUTTON_REPEAT
, BUTTON_NEXT
},
513 { ACTION_USB_HID_PRESENTATION_SCREEN_BLACK
, BUTTON_DOWN
|BUTTON_REL
, BUTTON_DOWN
},
514 { ACTION_USB_HID_PRESENTATION_SCREEN_WHITE
, BUTTON_DOWN
|BUTTON_REPEAT
, BUTTON_DOWN
},
515 { ACTION_USB_HID_PRESENTATION_LINK_PREV
, BUTTON_VOL_UP
, BUTTON_NONE
},
516 { ACTION_USB_HID_PRESENTATION_LINK_PREV
, BUTTON_VOL_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
517 { ACTION_USB_HID_PRESENTATION_LINK_NEXT
, BUTTON_VOL_DOWN
, BUTTON_NONE
},
518 { ACTION_USB_HID_PRESENTATION_LINK_NEXT
, BUTTON_VOL_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
519 { ACTION_USB_HID_PRESENTATION_MOUSE_CLICK
, BUTTON_SELECT
|BUTTON_REL
, BUTTON_SELECT
},
520 { ACTION_USB_HID_PRESENTATION_MOUSE_CLICK
, BUTTON_BACK
|BUTTON_REL
, BUTTON_BACK
},
521 { ACTION_USB_HID_PRESENTATION_MOUSE_OVER
, BUTTON_SELECT
|BUTTON_REPEAT
, BUTTON_SELECT
},
522 { ACTION_USB_HID_PRESENTATION_MOUSE_OVER
, BUTTON_BACK
|BUTTON_REPEAT
, BUTTON_BACK
},
524 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_USB_HID
)
525 }; /* button_context_usb_hid_mode_presentation */
527 static const struct button_mapping button_context_usb_hid_mode_browser
[] = {
528 { ACTION_USB_HID_BROWSER_SCROLL_UP
, BUTTON_VOL_UP
, BUTTON_NONE
},
529 { ACTION_USB_HID_BROWSER_SCROLL_UP
, BUTTON_VOL_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
530 { ACTION_USB_HID_BROWSER_SCROLL_UP
, BUTTON_PREV
, BUTTON_NONE
},
531 { ACTION_USB_HID_BROWSER_SCROLL_UP
, BUTTON_PREV
|BUTTON_REPEAT
, BUTTON_NONE
},
532 { ACTION_USB_HID_BROWSER_SCROLL_DOWN
, BUTTON_VOL_DOWN
, BUTTON_NONE
},
533 { ACTION_USB_HID_BROWSER_SCROLL_DOWN
, BUTTON_VOL_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
534 { ACTION_USB_HID_BROWSER_SCROLL_DOWN
, BUTTON_NEXT
, BUTTON_NONE
},
535 { ACTION_USB_HID_BROWSER_SCROLL_DOWN
, BUTTON_NEXT
|BUTTON_REPEAT
, BUTTON_NONE
},
536 { ACTION_USB_HID_BROWSER_SCROLL_PAGE_UP
, BUTTON_UP
|BUTTON_REL
, BUTTON_UP
},
537 { ACTION_USB_HID_BROWSER_SCROLL_PAGE_DOWN
, BUTTON_DOWN
|BUTTON_REL
, BUTTON_DOWN
},
538 { ACTION_USB_HID_BROWSER_ZOOM_IN
, BUTTON_UP
|BUTTON_REPEAT
, BUTTON_UP
},
539 { ACTION_USB_HID_BROWSER_ZOOM_OUT
, BUTTON_DOWN
|BUTTON_REPEAT
, BUTTON_DOWN
},
540 { ACTION_USB_HID_BROWSER_ZOOM_RESET
, BUTTON_SELECT
|BUTTON_REPEAT
, BUTTON_SELECT
},
541 { ACTION_USB_HID_BROWSER_ZOOM_RESET
, BUTTON_UP
|BUTTON_DOWN
|BUTTON_REPEAT
, BUTTON_UP
|BUTTON_DOWN
},
542 { ACTION_USB_HID_BROWSER_TAB_PREV
, BUTTON_LEFT
|BUTTON_REL
, BUTTON_LEFT
},
543 { ACTION_USB_HID_BROWSER_TAB_NEXT
, BUTTON_RIGHT
|BUTTON_REL
, BUTTON_RIGHT
},
544 { ACTION_USB_HID_BROWSER_TAB_CLOSE
, BUTTON_PLAY
|BUTTON_REPEAT
, BUTTON_PLAY
},
545 { ACTION_USB_HID_BROWSER_TAB_CLOSE
, BUTTON_BACK
|BUTTON_REPEAT
, BUTTON_BACK
},
546 { ACTION_USB_HID_BROWSER_HISTORY_BACK
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_LEFT
},
547 { ACTION_USB_HID_BROWSER_HISTORY_FORWARD
, BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_RIGHT
},
548 { ACTION_USB_HID_BROWSER_VIEW_FULL_SCREEN
, BUTTON_SELECT
|BUTTON_REL
, BUTTON_SELECT
},
550 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_USB_HID
)
551 }; /* button_context_usb_hid_mode_browser */
553 #ifdef HAVE_USB_HID_MOUSE
554 static const struct button_mapping button_context_usb_hid_mode_mouse
[] = {
555 { ACTION_USB_HID_MOUSE_UP
, BUTTON_UP
, BUTTON_NONE
},
556 { ACTION_USB_HID_MOUSE_UP_REP
, BUTTON_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
557 { ACTION_USB_HID_MOUSE_DOWN
, BUTTON_DOWN
, BUTTON_NONE
},
558 { ACTION_USB_HID_MOUSE_DOWN_REP
, BUTTON_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
559 { ACTION_USB_HID_MOUSE_LEFT
, BUTTON_LEFT
, BUTTON_NONE
},
560 { ACTION_USB_HID_MOUSE_LEFT_REP
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
561 { ACTION_USB_HID_MOUSE_RIGHT
, BUTTON_RIGHT
, BUTTON_NONE
},
562 { ACTION_USB_HID_MOUSE_RIGHT_REP
, BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
563 { ACTION_USB_HID_MOUSE_BUTTON_LEFT
, BUTTON_SELECT
, BUTTON_NONE
},
564 { ACTION_USB_HID_MOUSE_BUTTON_LEFT_REL
, BUTTON_SELECT
|BUTTON_REL
, BUTTON_NONE
},
565 { ACTION_USB_HID_MOUSE_LDRAG_UP
, BUTTON_SELECT
|BUTTON_UP
, BUTTON_NONE
},
566 { ACTION_USB_HID_MOUSE_LDRAG_UP_REP
, BUTTON_SELECT
|BUTTON_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
567 { ACTION_USB_HID_MOUSE_LDRAG_DOWN
, BUTTON_SELECT
|BUTTON_DOWN
, BUTTON_NONE
},
568 { ACTION_USB_HID_MOUSE_LDRAG_DOWN_REP
, BUTTON_SELECT
|BUTTON_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
569 { ACTION_USB_HID_MOUSE_LDRAG_LEFT
, BUTTON_SELECT
|BUTTON_LEFT
, BUTTON_NONE
},
570 { ACTION_USB_HID_MOUSE_LDRAG_LEFT_REP
, BUTTON_SELECT
|BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
571 { ACTION_USB_HID_MOUSE_LDRAG_RIGHT
, BUTTON_SELECT
|BUTTON_RIGHT
, BUTTON_NONE
},
572 { ACTION_USB_HID_MOUSE_LDRAG_RIGHT_REP
, BUTTON_SELECT
|BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
573 { ACTION_USB_HID_MOUSE_BUTTON_LEFT
, BUTTON_BACK
, BUTTON_NONE
},
574 { ACTION_USB_HID_MOUSE_BUTTON_LEFT_REL
, BUTTON_BACK
|BUTTON_REL
, BUTTON_NONE
},
575 { ACTION_USB_HID_MOUSE_LDRAG_UP
, BUTTON_BACK
|BUTTON_UP
, BUTTON_NONE
},
576 { ACTION_USB_HID_MOUSE_LDRAG_UP_REP
, BUTTON_BACK
|BUTTON_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
577 { ACTION_USB_HID_MOUSE_LDRAG_DOWN
, BUTTON_BACK
|BUTTON_DOWN
, BUTTON_NONE
},
578 { ACTION_USB_HID_MOUSE_LDRAG_DOWN_REP
, BUTTON_BACK
|BUTTON_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
579 { ACTION_USB_HID_MOUSE_LDRAG_LEFT
, BUTTON_BACK
|BUTTON_LEFT
, BUTTON_NONE
},
580 { ACTION_USB_HID_MOUSE_LDRAG_LEFT_REP
, BUTTON_BACK
|BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
581 { ACTION_USB_HID_MOUSE_LDRAG_RIGHT
, BUTTON_BACK
|BUTTON_RIGHT
, BUTTON_NONE
},
582 { ACTION_USB_HID_MOUSE_LDRAG_RIGHT_REP
, BUTTON_BACK
|BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
583 { ACTION_USB_HID_MOUSE_BUTTON_RIGHT
, BUTTON_MENU
, BUTTON_NONE
},
584 { ACTION_USB_HID_MOUSE_BUTTON_RIGHT_REL
, BUTTON_MENU
|BUTTON_REL
, BUTTON_NONE
},
585 { ACTION_USB_HID_MOUSE_RDRAG_UP
, BUTTON_MENU
|BUTTON_UP
, BUTTON_NONE
},
586 { ACTION_USB_HID_MOUSE_RDRAG_UP_REP
, BUTTON_MENU
|BUTTON_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
587 { ACTION_USB_HID_MOUSE_RDRAG_DOWN
, BUTTON_MENU
|BUTTON_DOWN
, BUTTON_NONE
},
588 { ACTION_USB_HID_MOUSE_RDRAG_DOWN_REP
, BUTTON_MENU
|BUTTON_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
589 { ACTION_USB_HID_MOUSE_RDRAG_LEFT
, BUTTON_MENU
|BUTTON_LEFT
, BUTTON_NONE
},
590 { ACTION_USB_HID_MOUSE_RDRAG_LEFT_REP
, BUTTON_MENU
|BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
591 { ACTION_USB_HID_MOUSE_RDRAG_RIGHT
, BUTTON_MENU
|BUTTON_RIGHT
, BUTTON_NONE
},
592 { ACTION_USB_HID_MOUSE_RDRAG_RIGHT_REP
, BUTTON_MENU
|BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
593 { ACTION_USB_HID_MOUSE_WHEEL_SCROLL_UP
, BUTTON_VOL_UP
, BUTTON_NONE
},
594 { ACTION_USB_HID_MOUSE_WHEEL_SCROLL_UP
, BUTTON_VOL_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
595 { ACTION_USB_HID_MOUSE_WHEEL_SCROLL_UP
, BUTTON_PREV
, BUTTON_NONE
},
596 { ACTION_USB_HID_MOUSE_WHEEL_SCROLL_UP
, BUTTON_PREV
|BUTTON_REPEAT
, BUTTON_NONE
},
597 { ACTION_USB_HID_MOUSE_WHEEL_SCROLL_DOWN
, BUTTON_VOL_DOWN
, BUTTON_NONE
},
598 { ACTION_USB_HID_MOUSE_WHEEL_SCROLL_DOWN
, BUTTON_VOL_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
599 { ACTION_USB_HID_MOUSE_WHEEL_SCROLL_DOWN
, BUTTON_NEXT
, BUTTON_NONE
},
600 { ACTION_USB_HID_MOUSE_WHEEL_SCROLL_DOWN
, BUTTON_NEXT
|BUTTON_REPEAT
, BUTTON_NONE
},
602 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_USB_HID
)
603 }; /* button_context_usb_hid_mode_mouse */
606 static const struct button_mapping remote_button_context_usb_hid
[] = {
607 { ACTION_USB_HID_MODE_SWITCH_NEXT
, BUTTON_RC_DSP
|BUTTON_REL
, BUTTON_RC_DSP
},
608 { ACTION_USB_HID_MODE_SWITCH_PREV
, BUTTON_RC_DSP
|BUTTON_REPEAT
, BUTTON_RC_DSP
},
611 }; /* remote_button_context_usb_hid */
613 static const struct button_mapping remote_button_context_usb_hid_mode_multimedia
[] = {
614 { ACTION_USB_HID_MULTIMEDIA_VOLUME_DOWN
, BUTTON_RC_VOL_DOWN
, BUTTON_NONE
},
615 { ACTION_USB_HID_MULTIMEDIA_VOLUME_DOWN
, BUTTON_RC_VOL_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
616 { ACTION_USB_HID_MULTIMEDIA_VOLUME_UP
, BUTTON_RC_VOL_UP
, BUTTON_NONE
},
617 { ACTION_USB_HID_MULTIMEDIA_VOLUME_UP
, BUTTON_RC_VOL_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
618 { ACTION_USB_HID_MULTIMEDIA_VOLUME_MUTE
, BUTTON_RC_FF
|BUTTON_REPEAT
, BUTTON_RC_FF
},
619 { ACTION_USB_HID_MULTIMEDIA_PLAYBACK_PLAY_PAUSE
, BUTTON_RC_PLAY
|BUTTON_REL
, BUTTON_RC_PLAY
},
620 { ACTION_USB_HID_MULTIMEDIA_PLAYBACK_STOP
, BUTTON_RC_PLAY
|BUTTON_REPEAT
, BUTTON_RC_PLAY
},
621 { ACTION_USB_HID_MULTIMEDIA_PLAYBACK_TRACK_PREV
, BUTTON_RC_REW
|BUTTON_REL
, BUTTON_RC_REW
},
622 { ACTION_USB_HID_MULTIMEDIA_PLAYBACK_TRACK_NEXT
, BUTTON_RC_FF
|BUTTON_REL
, BUTTON_RC_FF
},
624 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_USB_HID
)
625 }; /* remote_button_context_usb_hid_mode_multimedia */
627 static const struct button_mapping remote_button_context_usb_hid_mode_presentation
[] = {
628 { ACTION_USB_HID_PRESENTATION_SLIDESHOW_START
, BUTTON_RC_PLAY
|BUTTON_REL
, BUTTON_RC_PLAY
},
629 { ACTION_USB_HID_PRESENTATION_SLIDESHOW_LEAVE
, BUTTON_RC_PLAY
|BUTTON_REPEAT
, BUTTON_RC_PLAY
},
630 { ACTION_USB_HID_PRESENTATION_SLIDE_PREV
, BUTTON_RC_REW
|BUTTON_REL
, BUTTON_RC_REW
},
631 { ACTION_USB_HID_PRESENTATION_SLIDE_NEXT
, BUTTON_RC_FF
|BUTTON_REL
, BUTTON_RC_FF
},
632 { ACTION_USB_HID_PRESENTATION_LINK_PREV
, BUTTON_RC_VOL_UP
, BUTTON_NONE
},
633 { ACTION_USB_HID_PRESENTATION_LINK_PREV
, BUTTON_RC_VOL_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
634 { ACTION_USB_HID_PRESENTATION_LINK_NEXT
, BUTTON_RC_VOL_DOWN
, BUTTON_NONE
},
635 { ACTION_USB_HID_PRESENTATION_LINK_NEXT
, BUTTON_RC_VOL_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
636 { ACTION_USB_HID_PRESENTATION_MOUSE_CLICK
, BUTTON_RC_FF
|BUTTON_REPEAT
, BUTTON_RC_FF
},
637 { ACTION_USB_HID_PRESENTATION_MOUSE_OVER
, BUTTON_RC_REW
|BUTTON_REPEAT
, BUTTON_RC_REW
},
639 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_USB_HID
)
640 }; /* remote_button_context_usb_hid_mode_presentation */
642 static const struct button_mapping remote_button_context_usb_hid_mode_browser
[] = {
643 { ACTION_USB_HID_BROWSER_SCROLL_UP
, BUTTON_RC_VOL_UP
, BUTTON_NONE
},
644 { ACTION_USB_HID_BROWSER_SCROLL_UP
, BUTTON_RC_VOL_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
645 { ACTION_USB_HID_BROWSER_SCROLL_DOWN
, BUTTON_RC_VOL_DOWN
, BUTTON_NONE
},
646 { ACTION_USB_HID_BROWSER_SCROLL_DOWN
, BUTTON_RC_VOL_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
647 { ACTION_USB_HID_BROWSER_ZOOM_IN
, BUTTON_RC_FF
|BUTTON_REPEAT
, BUTTON_RC_FF
},
648 { ACTION_USB_HID_BROWSER_ZOOM_OUT
, BUTTON_RC_REW
|BUTTON_REPEAT
, BUTTON_RC_REW
},
649 { ACTION_USB_HID_BROWSER_ZOOM_RESET
, BUTTON_RC_FF
|BUTTON_RC_REW
|BUTTON_REPEAT
, BUTTON_RC_FF
|BUTTON_RC_REW
},
650 { ACTION_USB_HID_BROWSER_TAB_PREV
, BUTTON_RC_REW
|BUTTON_REL
, BUTTON_RC_REW
},
651 { ACTION_USB_HID_BROWSER_TAB_NEXT
, BUTTON_RC_FF
|BUTTON_REL
, BUTTON_RC_FF
},
652 { ACTION_USB_HID_BROWSER_TAB_CLOSE
, BUTTON_RC_PLAY
|BUTTON_REPEAT
, BUTTON_RC_PLAY
},
653 { ACTION_USB_HID_BROWSER_VIEW_FULL_SCREEN
, BUTTON_RC_PLAY
|BUTTON_REL
, BUTTON_RC_PLAY
},
655 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_USB_HID
)
656 }; /* remote_button_context_usb_hid_mode_browser */
659 static const struct button_mapping
* get_context_mapping_remote( int context
)
661 context
&= ~CONTEXT_REMOTE
;
666 return remote_button_context_wps
;
668 case CONTEXT_MAINMENU
:
670 return remote_button_context_tree
;
672 case CONTEXT_SETTINGS_COLOURCHOOSER
:
673 case CONTEXT_SETTINGS_EQ
:
674 case CONTEXT_SETTINGS_RECTRIGGER
:
675 return remote_button_context_right_is_inc
;
677 case CONTEXT_SETTINGS_TIME
:
678 return remote_button_context_time
;
680 case CONTEXT_YESNOSCREEN
:
681 return remote_button_context_yesno
;
683 case CONTEXT_BOOKMARKSCREEN
:
684 return remote_button_context_bmark
;
686 case CONTEXT_QUICKSCREEN
:
687 return remote_button_context_quickscreen
;
689 case CONTEXT_PITCHSCREEN
:
690 return remote_button_context_pitchscreen
;
692 case CONTEXT_RECSCREEN
:
693 return remote_button_context_recscreen
;
695 case CONTEXT_KEYBOARD
:
696 case CONTEXT_MORSE_INPUT
:
697 return ACTION_NONE
; /* Any sensible mapping for this remote? */
700 return remote_button_context_radio
;
702 #ifdef USB_ENABLE_HID
703 case CONTEXT_USB_HID
:
704 return remote_button_context_usb_hid
;
705 case CONTEXT_USB_HID_MODE_MULTIMEDIA
:
706 return remote_button_context_usb_hid_mode_multimedia
;
707 case CONTEXT_USB_HID_MODE_PRESENTATION
:
708 return remote_button_context_usb_hid_mode_presentation
;
709 case CONTEXT_USB_HID_MODE_BROWSER
:
710 return remote_button_context_usb_hid_mode_browser
;
714 return remote_button_context_standard
;
718 const struct button_mapping
* get_context_mapping(int context
)
720 if (context
& CONTEXT_REMOTE
)
721 return get_context_mapping_remote(context
);
726 return button_context_wps
;
729 return button_context_list
;
731 case CONTEXT_MAINMENU
:
733 if (global_settings
.hold_lr_for_scroll_in_list
)
734 return button_context_listtree_scroll_without_combo
;
736 return button_context_listtree_scroll_with_combo
;
738 case CONTEXT_CUSTOM
|CONTEXT_TREE
:
739 return button_context_tree
;
741 case CONTEXT_SETTINGS
:
742 return button_context_settings
;
744 case CONTEXT_CUSTOM
|CONTEXT_SETTINGS
:
745 return button_context_settings_right_is_inc
;
747 case CONTEXT_SETTINGS_COLOURCHOOSER
:
748 return button_context_colorchooser
;
750 case CONTEXT_SETTINGS_EQ
:
751 return button_context_eq
;
753 case CONTEXT_SETTINGS_TIME
:
754 return button_context_time
;
756 case CONTEXT_YESNOSCREEN
:
757 return button_context_yesno
;
759 case CONTEXT_BOOKMARKSCREEN
:
760 return button_context_bmark
;
762 case CONTEXT_QUICKSCREEN
:
763 return button_context_quickscreen
;
765 case CONTEXT_PITCHSCREEN
:
766 return button_context_pitchscreen
;
768 case CONTEXT_RECSCREEN
:
769 return button_context_recscreen
;
771 case CONTEXT_SETTINGS_RECTRIGGER
:
772 return button_context_settings_right_is_inc
;
774 case CONTEXT_KEYBOARD
:
775 case CONTEXT_MORSE_INPUT
:
776 return button_context_keyboard
;
779 return button_context_radio
;
781 #ifdef USB_ENABLE_HID
782 case CONTEXT_USB_HID
:
783 return button_context_usb_hid
;
784 case CONTEXT_USB_HID_MODE_MULTIMEDIA
:
785 return button_context_usb_hid_mode_multimedia
;
786 case CONTEXT_USB_HID_MODE_PRESENTATION
:
787 return button_context_usb_hid_mode_presentation
;
788 case CONTEXT_USB_HID_MODE_BROWSER
:
789 return button_context_usb_hid_mode_browser
;
790 #ifdef HAVE_USB_HID_MOUSE
791 case CONTEXT_USB_HID_MODE_MOUSE
:
792 return button_context_usb_hid_mode_mouse
;
797 return button_context_standard
;