1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 * Copyright (C) 2008 Mark Arigo
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 Olympus m:robe 100 */
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_DISPLAY
, BUTTON_NONE
},
57 { ACTION_STD_CANCEL
, BUTTON_POWER
, 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
},
74 { ACTION_WPS_STOP
, BUTTON_PLAY
|BUTTON_REPEAT
, BUTTON_PLAY
},
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_VOLDOWN
, BUTTON_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
85 { ACTION_WPS_VOLDOWN
, BUTTON_DOWN
, BUTTON_NONE
},
86 { ACTION_WPS_VOLUP
, BUTTON_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
87 { ACTION_WPS_VOLUP
, BUTTON_UP
, BUTTON_NONE
},
89 { ACTION_WPS_MENU
, BUTTON_MENU
|BUTTON_REL
, BUTTON_MENU
},
90 { ACTION_WPS_QUICKSCREEN
, BUTTON_MENU
|BUTTON_REPEAT
, BUTTON_MENU
},
92 { ACTION_WPS_BROWSE
, BUTTON_DISPLAY
|BUTTON_REL
, BUTTON_DISPLAY
},
93 { ACTION_WPS_ABSETB_NEXTDIR
,BUTTON_DISPLAY
|BUTTON_RIGHT
, BUTTON_NONE
},
94 { ACTION_WPS_ABSETA_PREVDIR
,BUTTON_DISPLAY
|BUTTON_LEFT
, BUTTON_NONE
},
95 { ACTION_WPS_ABRESET
, BUTTON_DISPLAY
|BUTTON_SELECT
, BUTTON_NONE
},
96 { ACTION_WPS_PITCHSCREEN
, BUTTON_DISPLAY
|BUTTON_UP
, BUTTON_DISPLAY
},
97 { ACTION_WPS_PITCHSCREEN
, BUTTON_DISPLAY
|BUTTON_DOWN
, BUTTON_DISPLAY
},
98 { ACTION_WPS_ID3SCREEN
, BUTTON_DISPLAY
|BUTTON_MENU
, BUTTON_NONE
},
100 { ACTION_WPS_CONTEXT
, BUTTON_SELECT
|BUTTON_REPEAT
, BUTTON_SELECT
},
103 }; /* button_context_wps */
105 static const struct button_mapping button_context_list
[] = {
106 { ACTION_LISTTREE_PGUP
, BUTTON_DISPLAY
|BUTTON_UP
, BUTTON_DISPLAY
},
107 { ACTION_LISTTREE_PGUP
, BUTTON_UP
|BUTTON_REL
, BUTTON_DISPLAY
|BUTTON_UP
},
108 { ACTION_LISTTREE_PGUP
, BUTTON_DISPLAY
|BUTTON_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
109 { ACTION_LISTTREE_PGDOWN
, BUTTON_DISPLAY
|BUTTON_DOWN
, BUTTON_DISPLAY
},
110 { ACTION_LISTTREE_PGDOWN
, BUTTON_DOWN
|BUTTON_REL
, BUTTON_DISPLAY
|BUTTON_DOWN
},
111 { ACTION_LISTTREE_PGDOWN
, BUTTON_DISPLAY
|BUTTON_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
113 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
114 }; /* button_context_list */
116 static const struct button_mapping button_context_tree
[] = {
117 { ACTION_TREE_WPS
, BUTTON_DISPLAY
|BUTTON_REL
, BUTTON_DISPLAY
},
118 { ACTION_TREE_STOP
, BUTTON_PLAY
|BUTTON_REPEAT
, BUTTON_PLAY
},
119 { ACTION_TREE_STOP
, BUTTON_POWER
, BUTTON_NONE
},
120 { ACTION_TREE_STOP
, BUTTON_POWER
|BUTTON_REL
, BUTTON_POWER
},
121 { ACTION_TREE_STOP
, BUTTON_POWER
|BUTTON_REPEAT
, BUTTON_NONE
},
123 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST
)
124 }; /* button_context_tree */
126 static const struct button_mapping button_context_listtree_scroll_with_combo
[] = {
127 { ACTION_NONE
, BUTTON_DISPLAY
, BUTTON_NONE
},
128 { ACTION_TREE_PGLEFT
, BUTTON_DISPLAY
|BUTTON_LEFT
, BUTTON_DISPLAY
},
129 { ACTION_TREE_PGLEFT
, BUTTON_LEFT
|BUTTON_REL
, BUTTON_DISPLAY
|BUTTON_LEFT
},
130 { ACTION_TREE_PGLEFT
, BUTTON_DISPLAY
|BUTTON_LEFT
, BUTTON_LEFT
|BUTTON_REL
},
131 { ACTION_TREE_ROOT_INIT
, BUTTON_DISPLAY
|BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_DISPLAY
|BUTTON_LEFT
},
132 { ACTION_TREE_PGLEFT
, BUTTON_DISPLAY
|BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
133 { ACTION_TREE_PGRIGHT
, BUTTON_DISPLAY
|BUTTON_RIGHT
, BUTTON_DISPLAY
},
134 { ACTION_TREE_PGRIGHT
, BUTTON_RIGHT
|BUTTON_REL
, BUTTON_DISPLAY
|BUTTON_RIGHT
},
135 { ACTION_TREE_PGRIGHT
, BUTTON_DISPLAY
|BUTTON_RIGHT
, BUTTON_RIGHT
|BUTTON_REL
},
136 { ACTION_TREE_PGRIGHT
, BUTTON_DISPLAY
|BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
138 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM
|CONTEXT_TREE
),
141 static const struct button_mapping button_context_listtree_scroll_without_combo
[] = {
142 { ACTION_NONE
, BUTTON_LEFT
, BUTTON_NONE
},
143 { ACTION_STD_CANCEL
, BUTTON_LEFT
|BUTTON_REL
, BUTTON_LEFT
},
144 { ACTION_TREE_ROOT_INIT
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_LEFT
},
145 { ACTION_TREE_PGLEFT
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
146 { ACTION_TREE_PGLEFT
, BUTTON_LEFT
|BUTTON_REL
, BUTTON_LEFT
|BUTTON_REPEAT
},
147 { ACTION_NONE
, BUTTON_RIGHT
, BUTTON_NONE
},
148 { ACTION_STD_OK
, BUTTON_RIGHT
|BUTTON_REL
, BUTTON_RIGHT
},
149 { ACTION_TREE_PGRIGHT
, BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
150 { ACTION_TREE_PGRIGHT
, BUTTON_RIGHT
|BUTTON_REL
, BUTTON_RIGHT
|BUTTON_REPEAT
},
151 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM
|CONTEXT_TREE
),
154 static const struct button_mapping button_context_settings
[] = {
155 { ACTION_SETTINGS_INC
, BUTTON_UP
, BUTTON_NONE
},
156 { ACTION_SETTINGS_INCREPEAT
,BUTTON_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
157 { ACTION_SETTINGS_DEC
, BUTTON_DOWN
, BUTTON_NONE
},
158 { ACTION_SETTINGS_DECREPEAT
,BUTTON_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
159 { ACTION_STD_PREV
, BUTTON_LEFT
, BUTTON_NONE
},
160 { ACTION_STD_PREVREPEAT
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
161 { ACTION_STD_NEXT
, BUTTON_RIGHT
, BUTTON_NONE
},
162 { ACTION_STD_NEXTREPEAT
, BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
163 { ACTION_SETTINGS_RESET
, BUTTON_DISPLAY
, BUTTON_NONE
},
165 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
166 }; /* button_context_settings */
168 static const struct button_mapping button_context_settings_right_is_inc
[] = {
169 { ACTION_SETTINGS_INC
, BUTTON_RIGHT
, BUTTON_NONE
},
170 { ACTION_SETTINGS_INCREPEAT
,BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
171 { ACTION_SETTINGS_DEC
, BUTTON_LEFT
, BUTTON_NONE
},
172 { ACTION_SETTINGS_DECREPEAT
,BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
173 { ACTION_STD_PREV
, BUTTON_UP
, BUTTON_NONE
},
174 { ACTION_STD_PREVREPEAT
, BUTTON_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
175 { ACTION_STD_NEXT
, BUTTON_DOWN
, BUTTON_NONE
},
176 { ACTION_STD_NEXTREPEAT
, BUTTON_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
177 { ACTION_SETTINGS_RESET
, BUTTON_DISPLAY
, BUTTON_NONE
},
179 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
180 }; /* button_context_settingsgraphical */
182 static const struct button_mapping button_context_yesno
[] = {
183 { ACTION_YESNO_ACCEPT
, BUTTON_SELECT
, BUTTON_NONE
},
185 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
186 }; /* button_context_settings_yesno */
188 static const struct button_mapping button_context_colorchooser
[] = {
189 { ACTION_STD_OK
, BUTTON_DISPLAY
|BUTTON_REL
, BUTTON_NONE
},
191 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM
|CONTEXT_SETTINGS
),
192 }; /* button_context_colorchooser */
194 static const struct button_mapping button_context_eq
[] = {
195 { ACTION_STD_OK
, BUTTON_SELECT
|BUTTON_REL
, BUTTON_NONE
},
197 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM
|CONTEXT_SETTINGS
),
198 }; /* button_context_eq */
200 /** Bookmark Screen **/
201 static const struct button_mapping button_context_bmark
[] = {
202 { ACTION_BMS_DELETE
, BUTTON_DISPLAY
, BUTTON_NONE
},
204 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST
),
205 }; /* button_context_bmark */
207 static const struct button_mapping button_context_time
[] = {
208 { ACTION_STD_CANCEL
, BUTTON_POWER
, BUTTON_NONE
},
209 { ACTION_STD_OK
, BUTTON_DISPLAY
, BUTTON_NONE
},
211 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS
),
212 }; /* button_context_time */
214 static const struct button_mapping button_context_quickscreen
[] = {
215 { ACTION_QS_DOWNINV
, BUTTON_UP
, BUTTON_NONE
},
216 { ACTION_QS_DOWNINV
, BUTTON_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
217 { ACTION_QS_DOWN
, BUTTON_DOWN
, BUTTON_NONE
},
218 { ACTION_QS_DOWN
, BUTTON_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
219 { ACTION_QS_LEFT
, BUTTON_LEFT
, BUTTON_NONE
},
220 { ACTION_QS_LEFT
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
221 { ACTION_QS_RIGHT
, BUTTON_RIGHT
, BUTTON_NONE
},
222 { ACTION_QS_RIGHT
, BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
223 { ACTION_STD_CANCEL
, BUTTON_MENU
, BUTTON_NONE
},
225 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
226 }; /* button_context_quickscreen */
228 static const struct button_mapping button_context_pitchscreen
[] = {
229 { ACTION_PS_INC_SMALL
, BUTTON_UP
, BUTTON_NONE
},
230 { ACTION_PS_INC_BIG
, BUTTON_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
231 { ACTION_PS_DEC_SMALL
, BUTTON_DOWN
, BUTTON_NONE
},
232 { ACTION_PS_DEC_BIG
, BUTTON_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
233 { ACTION_PS_NUDGE_LEFT
, BUTTON_LEFT
, BUTTON_NONE
},
234 { ACTION_PS_NUDGE_LEFTOFF
, BUTTON_LEFT
|BUTTON_REL
, BUTTON_NONE
},
235 { ACTION_PS_NUDGE_RIGHT
, BUTTON_RIGHT
, BUTTON_NONE
},
236 { ACTION_PS_NUDGE_RIGHTOFF
, BUTTON_RIGHT
|BUTTON_REL
, BUTTON_NONE
},
237 { ACTION_PS_TOGGLE_MODE
, BUTTON_MENU
, BUTTON_NONE
},
238 { ACTION_PS_RESET
, BUTTON_DISPLAY
, BUTTON_NONE
},
239 { ACTION_PS_EXIT
, BUTTON_PLAY
, BUTTON_NONE
},
241 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
242 }; /* button_context_pitchcreen */
244 static const struct button_mapping button_context_keyboard
[] = {
245 { ACTION_KBD_LEFT
, BUTTON_LEFT
, BUTTON_NONE
},
246 { ACTION_KBD_LEFT
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
247 { ACTION_KBD_RIGHT
, BUTTON_RIGHT
, BUTTON_NONE
},
248 { ACTION_KBD_RIGHT
, BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
249 { ACTION_KBD_CURSOR_LEFT
, BUTTON_DISPLAY
|BUTTON_LEFT
, BUTTON_NONE
},
250 { ACTION_KBD_CURSOR_LEFT
, BUTTON_DISPLAY
|BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
251 { ACTION_KBD_CURSOR_RIGHT
, BUTTON_DISPLAY
|BUTTON_RIGHT
, BUTTON_NONE
},
252 { ACTION_KBD_CURSOR_RIGHT
, BUTTON_DISPLAY
|BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
253 { ACTION_KBD_SELECT
, BUTTON_SELECT
, BUTTON_NONE
},
254 { ACTION_KBD_PAGE_FLIP
, BUTTON_DISPLAY
|BUTTON_MENU
, BUTTON_NONE
},
255 { ACTION_KBD_DONE
, BUTTON_DISPLAY
|BUTTON_REL
, BUTTON_DISPLAY
},
256 { ACTION_KBD_ABORT
, BUTTON_POWER
|BUTTON_REL
, BUTTON_POWER
},
257 { ACTION_KBD_BACKSPACE
, BUTTON_MENU
, BUTTON_NONE
},
258 { ACTION_KBD_BACKSPACE
, BUTTON_MENU
|BUTTON_REPEAT
, BUTTON_NONE
},
259 { ACTION_KBD_UP
, BUTTON_UP
, BUTTON_NONE
},
260 { ACTION_KBD_UP
, BUTTON_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
261 { ACTION_KBD_DOWN
, BUTTON_DOWN
, BUTTON_NONE
},
262 { ACTION_KBD_DOWN
, BUTTON_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
263 { ACTION_KBD_MORSE_INPUT
, BUTTON_DISPLAY
|BUTTON_POWER
, BUTTON_NONE
},
264 { ACTION_KBD_MORSE_SELECT
, BUTTON_SELECT
|BUTTON_REL
, BUTTON_NONE
},
267 }; /* button_context_keyboard */
269 /*****************************************************************************
270 * Remote control mappings
271 *****************************************************************************/
273 static const struct button_mapping remote_button_context_standard
[] = {
274 { ACTION_STD_PREV
, BUTTON_RC_PLAY
, BUTTON_NONE
},
275 { ACTION_STD_PREVREPEAT
, BUTTON_RC_PLAY
|BUTTON_REPEAT
, BUTTON_NONE
},
276 { ACTION_STD_NEXT
, BUTTON_RC_DISPLAY
, BUTTON_NONE
},
277 { ACTION_STD_NEXTREPEAT
, BUTTON_RC_DISPLAY
|BUTTON_REPEAT
,BUTTON_NONE
},
278 { ACTION_STD_CANCEL
, BUTTON_RC_REW
, BUTTON_NONE
},
279 { ACTION_STD_OK
, BUTTON_RC_FF
|BUTTON_REL
, BUTTON_RC_FF
},
280 { ACTION_STD_CONTEXT
, BUTTON_RC_FF
|BUTTON_REPEAT
, BUTTON_RC_FF
},
281 { ACTION_STD_MENU
, BUTTON_RC_FAV
, BUTTON_NONE
},
286 static const struct button_mapping remote_button_context_wps
[] = {
287 { ACTION_WPS_PLAY
, BUTTON_RC_PLAY
, BUTTON_NONE
},
289 { ACTION_WPS_SKIPNEXT
, BUTTON_RC_FF
|BUTTON_REL
, BUTTON_RC_FF
},
290 { ACTION_WPS_SKIPPREV
, BUTTON_RC_REW
|BUTTON_REL
, BUTTON_RC_REW
},
292 { ACTION_WPS_SEEKBACK
, BUTTON_RC_REW
|BUTTON_REPEAT
, BUTTON_NONE
},
293 { ACTION_WPS_SEEKFWD
, BUTTON_RC_FF
|BUTTON_REPEAT
, BUTTON_NONE
},
294 { ACTION_WPS_STOPSEEK
, BUTTON_RC_REW
|BUTTON_REL
, BUTTON_RC_REW
|BUTTON_REPEAT
},
295 { ACTION_WPS_STOPSEEK
, BUTTON_RC_FF
|BUTTON_REL
, BUTTON_RC_FF
|BUTTON_REPEAT
},
297 { ACTION_WPS_STOP
, BUTTON_RC_PLAY
|BUTTON_REPEAT
, BUTTON_RC_PLAY
},
298 { ACTION_WPS_MENU
, BUTTON_RC_FAV
, BUTTON_NONE
},
300 { ACTION_WPS_VOLDOWN
, BUTTON_RC_VOL_DOWN
, BUTTON_NONE
},
301 { ACTION_WPS_VOLDOWN
, BUTTON_RC_VOL_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
302 { ACTION_WPS_VOLUP
, BUTTON_RC_VOL_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
303 { ACTION_WPS_VOLUP
, BUTTON_RC_VOL_UP
, BUTTON_NONE
},
305 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
308 static const struct button_mapping remote_button_context_tree
[] = {
309 { ACTION_TREE_WPS
, BUTTON_RC_PLAY
|BUTTON_REL
, BUTTON_RC_PLAY
},
310 { ACTION_TREE_STOP
, BUTTON_RC_PLAY
|BUTTON_REPEAT
, BUTTON_RC_PLAY
},
311 { ACTION_STD_CANCEL
, BUTTON_RC_REW
|BUTTON_REPEAT
, BUTTON_NONE
},
313 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
317 static const struct button_mapping button_context_usb_hid
[] = {
318 { ACTION_USB_HID_PLAY
, BUTTON_PLAY
, BUTTON_NONE
},
319 { ACTION_USB_HID_STOP
, BUTTON_POWER
, BUTTON_NONE
},
320 { ACTION_USB_HID_SKIPPREV
, BUTTON_LEFT
, BUTTON_NONE
},
321 { ACTION_USB_HID_SKIPNEXT
, BUTTON_RIGHT
, BUTTON_NONE
},
322 { ACTION_USB_HID_VOLUP
, BUTTON_UP
, BUTTON_NONE
},
323 { ACTION_USB_HID_VOLUP
, BUTTON_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
324 { ACTION_USB_HID_VOLDOWN
, BUTTON_DOWN
, BUTTON_NONE
},
325 { ACTION_USB_HID_VOLDOWN
, BUTTON_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
326 { ACTION_USB_HID_MUTE
, BUTTON_SELECT
, BUTTON_NONE
},
327 { ACTION_USB_HID_MENU
, BUTTON_MENU
, BUTTON_NONE
},
330 }; /* button_context_usb_hid */
332 static const struct button_mapping remote_button_context_usb_hid
[] = {
333 { ACTION_USB_HID_PLAY
, BUTTON_RC_PLAY
, BUTTON_NONE
},
334 { ACTION_USB_HID_STOP
, BUTTON_RC_PLAY
|BUTTON_REPEAT
, BUTTON_NONE
},
335 { ACTION_USB_HID_SKIPPREV
, BUTTON_RC_REW
, BUTTON_NONE
},
336 { ACTION_USB_HID_SKIPNEXT
, BUTTON_RC_FF
, BUTTON_NONE
},
337 { ACTION_USB_HID_VOLUP
, BUTTON_RC_VOL_UP
, BUTTON_NONE
},
338 { ACTION_USB_HID_VOLUP
, BUTTON_RC_VOL_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
339 { ACTION_USB_HID_VOLDOWN
, BUTTON_RC_VOL_DOWN
, BUTTON_NONE
},
340 { ACTION_USB_HID_VOLDOWN
, BUTTON_RC_VOL_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
341 { ACTION_USB_HID_MENU
, BUTTON_RC_FAV
, BUTTON_NONE
},
344 }; /* remote_button_context_usb_hid */
347 static const struct button_mapping
* get_context_mapping_remote( int context
)
349 context
^= CONTEXT_REMOTE
;
354 return remote_button_context_wps
;
355 case CONTEXT_MAINMENU
:
357 return remote_button_context_tree
;
359 case CONTEXT_USB_HID
:
360 return remote_button_context_usb_hid
;
363 return remote_button_context_standard
;
366 const struct button_mapping
* get_context_mapping(int context
)
368 if (context
&CONTEXT_REMOTE
)
369 return get_context_mapping_remote(context
);
374 return button_context_standard
;
376 return button_context_wps
;
379 return button_context_list
;
380 case CONTEXT_MAINMENU
:
382 if (global_settings
.hold_lr_for_scroll_in_list
)
383 return button_context_listtree_scroll_without_combo
;
385 return button_context_listtree_scroll_with_combo
;
386 case CONTEXT_CUSTOM
|CONTEXT_TREE
:
387 return button_context_tree
;
389 case CONTEXT_SETTINGS
:
390 return button_context_settings
;
391 case CONTEXT_CUSTOM
|CONTEXT_SETTINGS
:
392 return button_context_settings_right_is_inc
;
394 case CONTEXT_SETTINGS_COLOURCHOOSER
:
395 return button_context_colorchooser
;
396 case CONTEXT_SETTINGS_EQ
:
397 return button_context_eq
;
399 case CONTEXT_SETTINGS_TIME
:
400 return button_context_time
;
402 case CONTEXT_YESNOSCREEN
:
403 return button_context_yesno
;
404 case CONTEXT_BOOKMARKSCREEN
:
405 return button_context_bmark
;
406 case CONTEXT_QUICKSCREEN
:
407 return button_context_quickscreen
;
408 case CONTEXT_PITCHSCREEN
:
409 return button_context_pitchscreen
;
410 case CONTEXT_KEYBOARD
:
411 return button_context_keyboard
;
413 case CONTEXT_USB_HID
:
414 return button_context_usb_hid
;
417 return button_context_standard
;