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_VIEW_PLAYLIST
, BUTTON_DISPLAY
|BUTTON_DOWN
, BUTTON_DISPLAY
},
98 { ACTION_WPS_HOTKEY
, 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_NONE
},
107 { ACTION_LISTTREE_PGUP
, BUTTON_DISPLAY
|BUTTON_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
108 { ACTION_LISTTREE_PGDOWN
, BUTTON_DISPLAY
|BUTTON_DOWN
, BUTTON_NONE
},
109 { ACTION_LISTTREE_PGDOWN
, BUTTON_DISPLAY
|BUTTON_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
111 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
112 }; /* button_context_list */
114 static const struct button_mapping button_context_tree
[] = {
115 { ACTION_TREE_WPS
, BUTTON_DISPLAY
|BUTTON_REL
, BUTTON_DISPLAY
},
116 { ACTION_TREE_STOP
, BUTTON_PLAY
|BUTTON_REPEAT
, BUTTON_PLAY
},
117 { ACTION_TREE_STOP
, BUTTON_POWER
, BUTTON_NONE
},
118 { ACTION_TREE_STOP
, BUTTON_POWER
|BUTTON_REL
, BUTTON_POWER
},
119 { ACTION_TREE_STOP
, BUTTON_POWER
|BUTTON_REPEAT
, BUTTON_NONE
},
120 { ACTION_TREE_HOTKEY
, BUTTON_DISPLAY
|BUTTON_MENU
, BUTTON_NONE
},
122 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST
)
123 }; /* button_context_tree */
125 static const struct button_mapping button_context_listtree_scroll_with_combo
[] = {
126 { ACTION_NONE
, BUTTON_DISPLAY
, BUTTON_NONE
},
127 { ACTION_TREE_PGLEFT
, BUTTON_DISPLAY
|BUTTON_LEFT
, BUTTON_NONE
},
128 { ACTION_TREE_ROOT_INIT
, BUTTON_DISPLAY
|BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_DISPLAY
|BUTTON_LEFT
},
129 { ACTION_TREE_PGLEFT
, BUTTON_DISPLAY
|BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
130 { ACTION_TREE_PGRIGHT
, BUTTON_DISPLAY
|BUTTON_RIGHT
, BUTTON_NONE
},
131 { ACTION_TREE_PGRIGHT
, BUTTON_DISPLAY
|BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
133 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM
|CONTEXT_TREE
),
136 static const struct button_mapping button_context_listtree_scroll_without_combo
[] = {
137 { ACTION_NONE
, BUTTON_LEFT
, BUTTON_NONE
},
138 { ACTION_STD_CANCEL
, BUTTON_LEFT
|BUTTON_REL
, BUTTON_LEFT
},
139 { ACTION_TREE_ROOT_INIT
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_LEFT
},
140 { ACTION_TREE_PGLEFT
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
141 { ACTION_NONE
, BUTTON_RIGHT
, BUTTON_NONE
},
142 { ACTION_STD_OK
, BUTTON_RIGHT
|BUTTON_REL
, BUTTON_RIGHT
},
143 { ACTION_TREE_PGRIGHT
, BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
144 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM
|CONTEXT_TREE
),
147 static const struct button_mapping button_context_settings
[] = {
148 { ACTION_SETTINGS_INC
, BUTTON_UP
, BUTTON_NONE
},
149 { ACTION_SETTINGS_INCREPEAT
,BUTTON_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
150 { ACTION_SETTINGS_DEC
, BUTTON_DOWN
, BUTTON_NONE
},
151 { ACTION_SETTINGS_DECREPEAT
,BUTTON_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
152 { ACTION_STD_PREV
, BUTTON_LEFT
, BUTTON_NONE
},
153 { ACTION_STD_PREVREPEAT
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
154 { ACTION_STD_NEXT
, BUTTON_RIGHT
, BUTTON_NONE
},
155 { ACTION_STD_NEXTREPEAT
, BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
156 { ACTION_SETTINGS_RESET
, BUTTON_DISPLAY
, BUTTON_NONE
},
158 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
159 }; /* button_context_settings */
161 static const struct button_mapping button_context_settings_right_is_inc
[] = {
162 { ACTION_SETTINGS_INC
, BUTTON_RIGHT
, BUTTON_NONE
},
163 { ACTION_SETTINGS_INCREPEAT
,BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
164 { ACTION_SETTINGS_DEC
, BUTTON_LEFT
, BUTTON_NONE
},
165 { ACTION_SETTINGS_DECREPEAT
,BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
166 { ACTION_STD_PREV
, BUTTON_UP
, BUTTON_NONE
},
167 { ACTION_STD_PREVREPEAT
, BUTTON_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
168 { ACTION_STD_NEXT
, BUTTON_DOWN
, BUTTON_NONE
},
169 { ACTION_STD_NEXTREPEAT
, BUTTON_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
170 { ACTION_SETTINGS_RESET
, BUTTON_DISPLAY
, BUTTON_NONE
},
172 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
173 }; /* button_context_settingsgraphical */
175 static const struct button_mapping button_context_yesno
[] = {
176 { ACTION_YESNO_ACCEPT
, BUTTON_SELECT
, BUTTON_NONE
},
178 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
179 }; /* button_context_settings_yesno */
181 static const struct button_mapping button_context_colorchooser
[] = {
182 { ACTION_STD_OK
, BUTTON_DISPLAY
|BUTTON_REL
, BUTTON_NONE
},
184 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM
|CONTEXT_SETTINGS
),
185 }; /* button_context_colorchooser */
187 static const struct button_mapping button_context_eq
[] = {
188 { ACTION_STD_OK
, BUTTON_SELECT
|BUTTON_REL
, BUTTON_NONE
},
190 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM
|CONTEXT_SETTINGS
),
191 }; /* button_context_eq */
193 /** Bookmark Screen **/
194 static const struct button_mapping button_context_bmark
[] = {
195 { ACTION_BMS_DELETE
, BUTTON_DISPLAY
, BUTTON_NONE
},
197 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST
),
198 }; /* button_context_bmark */
200 static const struct button_mapping button_context_time
[] = {
201 { ACTION_STD_CANCEL
, BUTTON_POWER
, BUTTON_NONE
},
202 { ACTION_STD_OK
, BUTTON_DISPLAY
, BUTTON_NONE
},
204 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS
),
205 }; /* button_context_time */
207 static const struct button_mapping button_context_quickscreen
[] = {
208 { ACTION_QS_TOP
, BUTTON_UP
, BUTTON_NONE
},
209 { ACTION_QS_TOP
, BUTTON_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
210 { ACTION_QS_DOWN
, BUTTON_DOWN
, BUTTON_NONE
},
211 { ACTION_QS_DOWN
, BUTTON_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
212 { ACTION_QS_LEFT
, BUTTON_LEFT
, BUTTON_NONE
},
213 { ACTION_QS_LEFT
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
214 { ACTION_QS_RIGHT
, BUTTON_RIGHT
, BUTTON_NONE
},
215 { ACTION_QS_RIGHT
, BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
216 { ACTION_STD_CANCEL
, BUTTON_MENU
, BUTTON_NONE
},
218 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
219 }; /* button_context_quickscreen */
221 static const struct button_mapping button_context_pitchscreen
[] = {
222 { ACTION_PS_INC_SMALL
, BUTTON_UP
, BUTTON_NONE
},
223 { ACTION_PS_INC_BIG
, BUTTON_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
224 { ACTION_PS_DEC_SMALL
, BUTTON_DOWN
, BUTTON_NONE
},
225 { ACTION_PS_DEC_BIG
, BUTTON_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
226 { ACTION_PS_NUDGE_LEFT
, BUTTON_LEFT
, BUTTON_NONE
},
227 { ACTION_PS_NUDGE_LEFTOFF
, BUTTON_LEFT
|BUTTON_REL
, BUTTON_NONE
},
228 { ACTION_PS_NUDGE_RIGHT
, BUTTON_RIGHT
, BUTTON_NONE
},
229 { ACTION_PS_NUDGE_RIGHTOFF
, BUTTON_RIGHT
|BUTTON_REL
, BUTTON_NONE
},
230 { ACTION_PS_TOGGLE_MODE
, BUTTON_MENU
, BUTTON_NONE
},
231 { ACTION_PS_RESET
, BUTTON_DISPLAY
, BUTTON_NONE
},
232 { ACTION_PS_EXIT
, BUTTON_PLAY
, BUTTON_NONE
},
233 { ACTION_PS_SLOWER
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
234 { ACTION_PS_FASTER
, BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
236 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
237 }; /* button_context_pitchcreen */
239 static const struct button_mapping button_context_keyboard
[] = {
240 { ACTION_KBD_LEFT
, BUTTON_LEFT
, BUTTON_NONE
},
241 { ACTION_KBD_LEFT
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
242 { ACTION_KBD_RIGHT
, BUTTON_RIGHT
, BUTTON_NONE
},
243 { ACTION_KBD_RIGHT
, BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
244 { ACTION_KBD_CURSOR_LEFT
, BUTTON_DISPLAY
|BUTTON_LEFT
, BUTTON_NONE
},
245 { ACTION_KBD_CURSOR_LEFT
, BUTTON_DISPLAY
|BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
246 { ACTION_KBD_CURSOR_RIGHT
, BUTTON_DISPLAY
|BUTTON_RIGHT
, BUTTON_NONE
},
247 { ACTION_KBD_CURSOR_RIGHT
, BUTTON_DISPLAY
|BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
248 { ACTION_KBD_SELECT
, BUTTON_SELECT
, BUTTON_NONE
},
249 { ACTION_KBD_PAGE_FLIP
, BUTTON_DISPLAY
|BUTTON_MENU
, BUTTON_NONE
},
250 { ACTION_KBD_DONE
, BUTTON_DISPLAY
|BUTTON_REL
, BUTTON_DISPLAY
},
251 { ACTION_KBD_ABORT
, BUTTON_POWER
|BUTTON_REL
, BUTTON_POWER
},
252 { ACTION_KBD_BACKSPACE
, BUTTON_MENU
, BUTTON_NONE
},
253 { ACTION_KBD_BACKSPACE
, BUTTON_MENU
|BUTTON_REPEAT
, BUTTON_NONE
},
254 { ACTION_KBD_UP
, BUTTON_UP
, BUTTON_NONE
},
255 { ACTION_KBD_UP
, BUTTON_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
256 { ACTION_KBD_DOWN
, BUTTON_DOWN
, BUTTON_NONE
},
257 { ACTION_KBD_DOWN
, BUTTON_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
258 { ACTION_KBD_MORSE_INPUT
, BUTTON_DISPLAY
|BUTTON_POWER
, BUTTON_NONE
},
259 { ACTION_KBD_MORSE_SELECT
, BUTTON_SELECT
|BUTTON_REL
, BUTTON_NONE
},
262 }; /* button_context_keyboard */
264 /*****************************************************************************
265 * Remote control mappings
266 *****************************************************************************/
268 static const struct button_mapping remote_button_context_standard
[] = {
269 { ACTION_STD_PREV
, BUTTON_RC_PLAY
, BUTTON_NONE
},
270 { ACTION_STD_PREVREPEAT
, BUTTON_RC_PLAY
|BUTTON_REPEAT
, BUTTON_NONE
},
271 { ACTION_STD_NEXT
, BUTTON_RC_DOWN
, BUTTON_NONE
},
272 { ACTION_STD_NEXTREPEAT
, BUTTON_RC_DOWN
|BUTTON_REPEAT
,BUTTON_NONE
},
273 { ACTION_STD_CANCEL
, BUTTON_RC_REW
, BUTTON_NONE
},
274 { ACTION_STD_OK
, BUTTON_RC_FF
|BUTTON_REL
, BUTTON_RC_FF
},
275 { ACTION_STD_CONTEXT
, BUTTON_RC_FF
|BUTTON_REPEAT
, BUTTON_RC_FF
},
276 { ACTION_STD_MENU
, BUTTON_RC_HEART
, BUTTON_NONE
},
281 static const struct button_mapping remote_button_context_wps
[] = {
282 { ACTION_WPS_PLAY
, BUTTON_RC_PLAY
, BUTTON_NONE
},
284 { ACTION_WPS_SKIPNEXT
, BUTTON_RC_FF
|BUTTON_REL
, BUTTON_RC_FF
},
285 { ACTION_WPS_SKIPPREV
, BUTTON_RC_REW
|BUTTON_REL
, BUTTON_RC_REW
},
287 { ACTION_WPS_SEEKBACK
, BUTTON_RC_REW
|BUTTON_REPEAT
, BUTTON_NONE
},
288 { ACTION_WPS_SEEKFWD
, BUTTON_RC_FF
|BUTTON_REPEAT
, BUTTON_NONE
},
289 { ACTION_WPS_STOPSEEK
, BUTTON_RC_REW
|BUTTON_REL
, BUTTON_RC_REW
|BUTTON_REPEAT
},
290 { ACTION_WPS_STOPSEEK
, BUTTON_RC_FF
|BUTTON_REL
, BUTTON_RC_FF
|BUTTON_REPEAT
},
292 { ACTION_WPS_STOP
, BUTTON_RC_PLAY
|BUTTON_REPEAT
, BUTTON_RC_PLAY
},
293 { ACTION_WPS_MENU
, BUTTON_RC_HEART
, BUTTON_NONE
},
295 { ACTION_WPS_VOLDOWN
, BUTTON_RC_VOL_DOWN
, BUTTON_NONE
},
296 { ACTION_WPS_VOLDOWN
, BUTTON_RC_VOL_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
297 { ACTION_WPS_VOLUP
, BUTTON_RC_VOL_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
298 { ACTION_WPS_VOLUP
, BUTTON_RC_VOL_UP
, BUTTON_NONE
},
300 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
303 static const struct button_mapping remote_button_context_tree
[] = {
304 { ACTION_TREE_WPS
, BUTTON_RC_PLAY
|BUTTON_REL
, BUTTON_RC_PLAY
},
305 { ACTION_TREE_STOP
, BUTTON_RC_PLAY
|BUTTON_REPEAT
, BUTTON_RC_PLAY
},
306 { ACTION_STD_CANCEL
, BUTTON_RC_REW
|BUTTON_REPEAT
, BUTTON_NONE
},
308 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
311 #ifdef USB_ENABLE_HID
312 static const struct button_mapping button_context_usb_hid
[] = {
313 { ACTION_USB_HID_MODE_SWITCH_NEXT
, BUTTON_POWER
|BUTTON_REL
, BUTTON_POWER
},
314 { ACTION_USB_HID_MODE_SWITCH_PREV
, BUTTON_POWER
|BUTTON_REPEAT
, BUTTON_POWER
},
317 }; /* button_context_usb_hid */
319 static const struct button_mapping button_context_usb_hid_mode_multimedia
[] = {
320 { ACTION_USB_HID_MULTIMEDIA_VOLUME_DOWN
, BUTTON_DOWN
, BUTTON_NONE
},
321 { ACTION_USB_HID_MULTIMEDIA_VOLUME_DOWN
, BUTTON_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
322 { ACTION_USB_HID_MULTIMEDIA_VOLUME_UP
, BUTTON_UP
, BUTTON_NONE
},
323 { ACTION_USB_HID_MULTIMEDIA_VOLUME_UP
, BUTTON_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
324 { ACTION_USB_HID_MULTIMEDIA_VOLUME_MUTE
, BUTTON_SELECT
|BUTTON_REL
, BUTTON_SELECT
},
325 { ACTION_USB_HID_MULTIMEDIA_PLAYBACK_PLAY_PAUSE
, BUTTON_PLAY
|BUTTON_REL
, BUTTON_PLAY
},
326 { ACTION_USB_HID_MULTIMEDIA_PLAYBACK_STOP
, BUTTON_DISPLAY
|BUTTON_REL
, BUTTON_DISPLAY
},
327 { ACTION_USB_HID_MULTIMEDIA_PLAYBACK_STOP
, BUTTON_PLAY
|BUTTON_REPEAT
, BUTTON_PLAY
},
328 { ACTION_USB_HID_MULTIMEDIA_PLAYBACK_TRACK_PREV
, BUTTON_LEFT
|BUTTON_REL
, BUTTON_LEFT
},
329 { ACTION_USB_HID_MULTIMEDIA_PLAYBACK_TRACK_NEXT
, BUTTON_RIGHT
|BUTTON_REL
, BUTTON_RIGHT
},
331 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_USB_HID
)
332 }; /* button_context_usb_hid_mode_multimedia */
334 static const struct button_mapping button_context_usb_hid_mode_presentation
[] = {
335 { ACTION_USB_HID_PRESENTATION_SLIDESHOW_START
, BUTTON_PLAY
|BUTTON_REL
, BUTTON_PLAY
},
336 { ACTION_USB_HID_PRESENTATION_SLIDESHOW_LEAVE
, BUTTON_DISPLAY
|BUTTON_REL
, BUTTON_DISPLAY
},
337 { ACTION_USB_HID_PRESENTATION_SLIDESHOW_LEAVE
, BUTTON_PLAY
|BUTTON_REPEAT
, BUTTON_PLAY
},
338 { ACTION_USB_HID_PRESENTATION_SLIDE_PREV
, BUTTON_LEFT
|BUTTON_REL
, BUTTON_LEFT
},
339 { ACTION_USB_HID_PRESENTATION_SLIDE_NEXT
, BUTTON_RIGHT
|BUTTON_REL
, BUTTON_RIGHT
},
340 { ACTION_USB_HID_PRESENTATION_SLIDE_FIRST
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_LEFT
},
341 { ACTION_USB_HID_PRESENTATION_SLIDE_LAST
, BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_RIGHT
},
342 { ACTION_USB_HID_PRESENTATION_SCREEN_BLACK
, BUTTON_DOWN
|BUTTON_REL
, BUTTON_DOWN
},
343 { ACTION_USB_HID_PRESENTATION_SCREEN_WHITE
, BUTTON_DOWN
|BUTTON_REPEAT
, BUTTON_DOWN
},
344 { ACTION_USB_HID_PRESENTATION_LINK_PREV
, BUTTON_UP
, BUTTON_NONE
},
345 { ACTION_USB_HID_PRESENTATION_LINK_PREV
, BUTTON_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
346 { ACTION_USB_HID_PRESENTATION_LINK_NEXT
, BUTTON_DOWN
, BUTTON_NONE
},
347 { ACTION_USB_HID_PRESENTATION_LINK_NEXT
, BUTTON_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
348 { ACTION_USB_HID_PRESENTATION_MOUSE_CLICK
, BUTTON_SELECT
|BUTTON_REL
, BUTTON_SELECT
},
349 { ACTION_USB_HID_PRESENTATION_MOUSE_OVER
, BUTTON_SELECT
|BUTTON_REPEAT
, BUTTON_SELECT
},
351 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_USB_HID
)
352 }; /* button_context_usb_hid_mode_presentation */
354 static const struct button_mapping button_context_usb_hid_mode_browser
[] = {
355 { ACTION_USB_HID_BROWSER_SCROLL_UP
, BUTTON_UP
, BUTTON_NONE
},
356 { ACTION_USB_HID_BROWSER_SCROLL_UP
, BUTTON_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
357 { ACTION_USB_HID_BROWSER_SCROLL_DOWN
, BUTTON_DOWN
, BUTTON_NONE
},
358 { ACTION_USB_HID_BROWSER_SCROLL_DOWN
, BUTTON_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
359 { ACTION_USB_HID_BROWSER_SCROLL_PAGE_UP
, BUTTON_PLAY
|BUTTON_REL
, BUTTON_PLAY
},
360 { ACTION_USB_HID_BROWSER_SCROLL_PAGE_DOWN
, BUTTON_MENU
|BUTTON_REL
, BUTTON_MENU
},
361 { ACTION_USB_HID_BROWSER_ZOOM_IN
, BUTTON_PLAY
|BUTTON_REPEAT
, BUTTON_PLAY
},
362 { ACTION_USB_HID_BROWSER_ZOOM_OUT
, BUTTON_MENU
|BUTTON_REPEAT
, BUTTON_MENU
},
363 { ACTION_USB_HID_BROWSER_ZOOM_RESET
, BUTTON_SELECT
|BUTTON_REPEAT
, BUTTON_SELECT
},
364 { ACTION_USB_HID_BROWSER_ZOOM_RESET
, BUTTON_PLAY
|BUTTON_MENU
|BUTTON_REPEAT
, BUTTON_PLAY
|BUTTON_MENU
},
365 { ACTION_USB_HID_BROWSER_TAB_PREV
, BUTTON_LEFT
|BUTTON_REL
, BUTTON_LEFT
},
366 { ACTION_USB_HID_BROWSER_TAB_NEXT
, BUTTON_RIGHT
|BUTTON_REL
, BUTTON_RIGHT
},
367 { ACTION_USB_HID_BROWSER_TAB_CLOSE
, BUTTON_DISPLAY
|BUTTON_REPEAT
, BUTTON_DISPLAY
},
368 { ACTION_USB_HID_BROWSER_HISTORY_BACK
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_LEFT
},
369 { ACTION_USB_HID_BROWSER_HISTORY_FORWARD
, BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_RIGHT
},
370 { ACTION_USB_HID_BROWSER_VIEW_FULL_SCREEN
, BUTTON_SELECT
|BUTTON_REL
, BUTTON_SELECT
},
372 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_USB_HID
)
373 }; /* button_context_usb_hid_mode_browser */
375 #ifdef HAVE_USB_HID_MOUSE
376 static const struct button_mapping button_context_usb_hid_mode_mouse
[] = {
377 { ACTION_USB_HID_MOUSE_UP
, BUTTON_UP
, BUTTON_NONE
},
378 { ACTION_USB_HID_MOUSE_UP_REP
, BUTTON_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
379 { ACTION_USB_HID_MOUSE_DOWN
, BUTTON_DOWN
, BUTTON_NONE
},
380 { ACTION_USB_HID_MOUSE_DOWN_REP
, BUTTON_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
381 { ACTION_USB_HID_MOUSE_LEFT
, BUTTON_LEFT
, BUTTON_NONE
},
382 { ACTION_USB_HID_MOUSE_LEFT_REP
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
383 { ACTION_USB_HID_MOUSE_RIGHT
, BUTTON_RIGHT
, BUTTON_NONE
},
384 { ACTION_USB_HID_MOUSE_RIGHT_REP
, BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
385 { ACTION_USB_HID_MOUSE_BUTTON_LEFT
, BUTTON_MENU
, BUTTON_NONE
},
386 { ACTION_USB_HID_MOUSE_BUTTON_LEFT_REL
, BUTTON_MENU
|BUTTON_REL
, BUTTON_NONE
},
387 { ACTION_USB_HID_MOUSE_LDRAG_UP
, BUTTON_MENU
|BUTTON_UP
, BUTTON_NONE
},
388 { ACTION_USB_HID_MOUSE_LDRAG_UP_REP
, BUTTON_MENU
|BUTTON_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
389 { ACTION_USB_HID_MOUSE_LDRAG_DOWN
, BUTTON_MENU
|BUTTON_DOWN
, BUTTON_NONE
},
390 { ACTION_USB_HID_MOUSE_LDRAG_DOWN_REP
, BUTTON_MENU
|BUTTON_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
391 { ACTION_USB_HID_MOUSE_LDRAG_LEFT
, BUTTON_MENU
|BUTTON_LEFT
, BUTTON_NONE
},
392 { ACTION_USB_HID_MOUSE_LDRAG_LEFT_REP
, BUTTON_MENU
|BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
393 { ACTION_USB_HID_MOUSE_LDRAG_RIGHT
, BUTTON_MENU
|BUTTON_RIGHT
, BUTTON_NONE
},
394 { ACTION_USB_HID_MOUSE_LDRAG_RIGHT_REP
, BUTTON_MENU
|BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
395 { ACTION_USB_HID_MOUSE_BUTTON_RIGHT
, BUTTON_PLAY
, BUTTON_NONE
},
396 { ACTION_USB_HID_MOUSE_BUTTON_RIGHT_REL
, BUTTON_PLAY
|BUTTON_REL
, BUTTON_NONE
},
397 { ACTION_USB_HID_MOUSE_RDRAG_UP
, BUTTON_PLAY
|BUTTON_UP
, BUTTON_NONE
},
398 { ACTION_USB_HID_MOUSE_RDRAG_UP_REP
, BUTTON_PLAY
|BUTTON_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
399 { ACTION_USB_HID_MOUSE_RDRAG_DOWN
, BUTTON_PLAY
|BUTTON_DOWN
, BUTTON_NONE
},
400 { ACTION_USB_HID_MOUSE_RDRAG_DOWN_REP
, BUTTON_PLAY
|BUTTON_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
401 { ACTION_USB_HID_MOUSE_RDRAG_LEFT
, BUTTON_PLAY
|BUTTON_LEFT
, BUTTON_NONE
},
402 { ACTION_USB_HID_MOUSE_RDRAG_LEFT_REP
, BUTTON_PLAY
|BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
403 { ACTION_USB_HID_MOUSE_RDRAG_RIGHT
, BUTTON_PLAY
|BUTTON_RIGHT
, BUTTON_NONE
},
404 { ACTION_USB_HID_MOUSE_RDRAG_RIGHT_REP
, BUTTON_PLAY
|BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
405 { ACTION_USB_HID_MOUSE_WHEEL_SCROLL_UP
, BUTTON_UP
, BUTTON_NONE
},
406 { ACTION_USB_HID_MOUSE_WHEEL_SCROLL_UP
, BUTTON_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
407 { ACTION_USB_HID_MOUSE_WHEEL_SCROLL_DOWN
, BUTTON_DOWN
, BUTTON_NONE
},
408 { ACTION_USB_HID_MOUSE_WHEEL_SCROLL_DOWN
, BUTTON_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
410 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_USB_HID
)
411 }; /* button_context_usb_hid_mode_mouse */
414 static const struct button_mapping remote_button_context_usb_hid
[] = {
415 { ACTION_USB_HID_MODE_SWITCH_NEXT
, BUTTON_RC_MODE
|BUTTON_REL
, BUTTON_RC_MODE
},
416 { ACTION_USB_HID_MODE_SWITCH_PREV
, BUTTON_RC_MODE
|BUTTON_REPEAT
, BUTTON_RC_MODE
},
419 }; /* remote_button_context_usb_hid */
421 static const struct button_mapping remote_button_context_usb_hid_mode_multimedia
[] = {
422 { ACTION_USB_HID_MULTIMEDIA_VOLUME_DOWN
, BUTTON_RC_VOL_DOWN
, BUTTON_NONE
},
423 { ACTION_USB_HID_MULTIMEDIA_VOLUME_DOWN
, BUTTON_RC_VOL_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
424 { ACTION_USB_HID_MULTIMEDIA_VOLUME_UP
, BUTTON_RC_VOL_UP
, BUTTON_NONE
},
425 { ACTION_USB_HID_MULTIMEDIA_VOLUME_UP
, BUTTON_RC_VOL_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
426 { ACTION_USB_HID_MULTIMEDIA_VOLUME_MUTE
, BUTTON_RC_HEART
|BUTTON_REL
, BUTTON_RC_HEART
},
427 { ACTION_USB_HID_MULTIMEDIA_PLAYBACK_PLAY_PAUSE
, BUTTON_RC_PLAY
|BUTTON_REL
, BUTTON_RC_PLAY
},
428 { ACTION_USB_HID_MULTIMEDIA_PLAYBACK_STOP
, BUTTON_RC_DOWN
|BUTTON_REL
, BUTTON_RC_DOWN
},
429 { ACTION_USB_HID_MULTIMEDIA_PLAYBACK_STOP
, BUTTON_RC_PLAY
|BUTTON_REPEAT
, BUTTON_RC_PLAY
},
430 { ACTION_USB_HID_MULTIMEDIA_PLAYBACK_TRACK_PREV
, BUTTON_RC_REW
|BUTTON_REL
, BUTTON_RC_REW
},
431 { ACTION_USB_HID_MULTIMEDIA_PLAYBACK_TRACK_NEXT
, BUTTON_RC_FF
|BUTTON_REL
, BUTTON_RC_FF
},
433 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_USB_HID
)
434 }; /* remote_button_context_usb_hid_mode_multimedia */
436 static const struct button_mapping remote_button_context_usb_hid_mode_presentation
[] = {
437 { ACTION_USB_HID_PRESENTATION_SLIDESHOW_START
, BUTTON_RC_PLAY
|BUTTON_REL
, BUTTON_RC_PLAY
},
438 { ACTION_USB_HID_PRESENTATION_SLIDESHOW_LEAVE
, BUTTON_RC_PLAY
|BUTTON_REPEAT
, BUTTON_RC_PLAY
},
439 { ACTION_USB_HID_PRESENTATION_SLIDE_PREV
, BUTTON_RC_REW
|BUTTON_REL
, BUTTON_RC_REW
},
440 { ACTION_USB_HID_PRESENTATION_SLIDE_NEXT
, BUTTON_RC_FF
|BUTTON_REL
, BUTTON_RC_FF
},
441 { ACTION_USB_HID_PRESENTATION_SLIDE_FIRST
, BUTTON_RC_REW
|BUTTON_REPEAT
, BUTTON_RC_REW
},
442 { ACTION_USB_HID_PRESENTATION_SLIDE_LAST
, BUTTON_RC_FF
|BUTTON_REPEAT
, BUTTON_RC_FF
},
443 { ACTION_USB_HID_PRESENTATION_SCREEN_BLACK
, BUTTON_RC_DOWN
|BUTTON_REL
, BUTTON_RC_DOWN
},
444 { ACTION_USB_HID_PRESENTATION_SCREEN_WHITE
, BUTTON_RC_DOWN
|BUTTON_REPEAT
, BUTTON_RC_DOWN
},
445 { ACTION_USB_HID_PRESENTATION_LINK_PREV
, BUTTON_RC_VOL_UP
, BUTTON_NONE
},
446 { ACTION_USB_HID_PRESENTATION_LINK_PREV
, BUTTON_RC_VOL_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
447 { ACTION_USB_HID_PRESENTATION_LINK_NEXT
, BUTTON_RC_VOL_DOWN
, BUTTON_NONE
},
448 { ACTION_USB_HID_PRESENTATION_LINK_NEXT
, BUTTON_RC_VOL_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
449 { ACTION_USB_HID_PRESENTATION_MOUSE_CLICK
, BUTTON_RC_HEART
|BUTTON_REL
, BUTTON_RC_HEART
},
450 { ACTION_USB_HID_PRESENTATION_MOUSE_OVER
, BUTTON_RC_HEART
|BUTTON_REPEAT
, BUTTON_RC_HEART
},
452 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_USB_HID
)
453 }; /* remote_button_context_usb_hid_mode_presentation */
455 static const struct button_mapping remote_button_context_usb_hid_mode_browser
[] = {
456 { ACTION_USB_HID_BROWSER_SCROLL_UP
, BUTTON_RC_VOL_UP
, BUTTON_NONE
},
457 { ACTION_USB_HID_BROWSER_SCROLL_UP
, BUTTON_RC_VOL_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
458 { ACTION_USB_HID_BROWSER_SCROLL_DOWN
, BUTTON_RC_VOL_DOWN
, BUTTON_NONE
},
459 { ACTION_USB_HID_BROWSER_SCROLL_DOWN
, BUTTON_RC_VOL_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
460 { ACTION_USB_HID_BROWSER_SCROLL_PAGE_UP
, BUTTON_RC_PLAY
|BUTTON_REL
, BUTTON_RC_PLAY
},
461 { ACTION_USB_HID_BROWSER_SCROLL_PAGE_DOWN
, BUTTON_RC_DOWN
|BUTTON_REL
, BUTTON_RC_DOWN
},
462 { ACTION_USB_HID_BROWSER_ZOOM_IN
, BUTTON_RC_PLAY
|BUTTON_REPEAT
, BUTTON_RC_PLAY
},
463 { ACTION_USB_HID_BROWSER_ZOOM_OUT
, BUTTON_RC_DOWN
|BUTTON_REPEAT
, BUTTON_RC_DOWN
},
464 { ACTION_USB_HID_BROWSER_ZOOM_RESET
, BUTTON_RC_HEART
|BUTTON_REPEAT
, BUTTON_RC_HEART
},
465 { ACTION_USB_HID_BROWSER_TAB_PREV
, BUTTON_RC_REW
|BUTTON_REL
, BUTTON_RC_REW
},
466 { ACTION_USB_HID_BROWSER_TAB_NEXT
, BUTTON_RC_FF
|BUTTON_REL
, BUTTON_RC_FF
},
467 { ACTION_USB_HID_BROWSER_HISTORY_BACK
, BUTTON_RC_REW
|BUTTON_REPEAT
, BUTTON_RC_REW
},
468 { ACTION_USB_HID_BROWSER_HISTORY_FORWARD
, BUTTON_RC_FF
|BUTTON_REPEAT
, BUTTON_RC_FF
},
469 { ACTION_USB_HID_BROWSER_VIEW_FULL_SCREEN
, BUTTON_RC_HEART
|BUTTON_REL
, BUTTON_RC_HEART
},
471 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_USB_HID
)
472 }; /* remote_button_context_usb_hid_mode_browser */
474 #ifdef HAVE_USB_HID_MOUSE
475 static const struct button_mapping remote_button_context_usb_hid_mode_mouse
[] = {
476 { ACTION_USB_HID_MOUSE_UP
, BUTTON_RC_PLAY
, BUTTON_NONE
},
477 { ACTION_USB_HID_MOUSE_UP_REP
, BUTTON_RC_PLAY
|BUTTON_REPEAT
, BUTTON_NONE
},
478 { ACTION_USB_HID_MOUSE_DOWN
, BUTTON_RC_DOWN
, BUTTON_NONE
},
479 { ACTION_USB_HID_MOUSE_DOWN_REP
, BUTTON_RC_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
480 { ACTION_USB_HID_MOUSE_LEFT
, BUTTON_RC_REW
, BUTTON_NONE
},
481 { ACTION_USB_HID_MOUSE_LEFT_REP
, BUTTON_RC_REW
|BUTTON_REPEAT
, BUTTON_NONE
},
482 { ACTION_USB_HID_MOUSE_RIGHT
, BUTTON_RC_FF
, BUTTON_NONE
},
483 { ACTION_USB_HID_MOUSE_RIGHT_REP
, BUTTON_RC_FF
|BUTTON_REPEAT
, BUTTON_NONE
},
484 { ACTION_USB_HID_MOUSE_BUTTON_LEFT
, BUTTON_RC_HEART
, BUTTON_NONE
},
485 { ACTION_USB_HID_MOUSE_BUTTON_LEFT_REL
, BUTTON_RC_HEART
|BUTTON_REL
, BUTTON_NONE
},
486 { ACTION_USB_HID_MOUSE_LDRAG_UP
, BUTTON_RC_HEART
|BUTTON_RC_PLAY
, BUTTON_NONE
},
487 { ACTION_USB_HID_MOUSE_LDRAG_UP_REP
, BUTTON_RC_HEART
|BUTTON_RC_PLAY
|BUTTON_REPEAT
, BUTTON_NONE
},
488 { ACTION_USB_HID_MOUSE_LDRAG_DOWN
, BUTTON_RC_HEART
|BUTTON_RC_DOWN
, BUTTON_NONE
},
489 { ACTION_USB_HID_MOUSE_LDRAG_DOWN_REP
, BUTTON_RC_HEART
|BUTTON_RC_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
490 { ACTION_USB_HID_MOUSE_LDRAG_LEFT
, BUTTON_RC_HEART
|BUTTON_RC_REW
, BUTTON_NONE
},
491 { ACTION_USB_HID_MOUSE_LDRAG_LEFT_REP
, BUTTON_RC_HEART
|BUTTON_RC_REW
|BUTTON_REPEAT
, BUTTON_NONE
},
492 { ACTION_USB_HID_MOUSE_LDRAG_RIGHT
, BUTTON_RC_HEART
|BUTTON_RC_FF
, BUTTON_NONE
},
493 { ACTION_USB_HID_MOUSE_LDRAG_RIGHT_REP
, BUTTON_RC_HEART
|BUTTON_RC_FF
|BUTTON_REPEAT
, BUTTON_NONE
},
494 { ACTION_USB_HID_MOUSE_WHEEL_SCROLL_UP
, BUTTON_RC_VOL_UP
, BUTTON_NONE
},
495 { ACTION_USB_HID_MOUSE_WHEEL_SCROLL_UP
, BUTTON_RC_VOL_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
496 { ACTION_USB_HID_MOUSE_WHEEL_SCROLL_DOWN
, BUTTON_RC_VOL_DOWN
, BUTTON_NONE
},
497 { ACTION_USB_HID_MOUSE_WHEEL_SCROLL_DOWN
, BUTTON_RC_VOL_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
499 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_USB_HID
)
500 }; /* remote_button_context_usb_hid_mode_mouse */
504 static const struct button_mapping
* get_context_mapping_remote( int context
)
506 context
^= CONTEXT_REMOTE
;
511 return remote_button_context_wps
;
512 case CONTEXT_MAINMENU
:
514 return remote_button_context_tree
;
515 #ifdef USB_ENABLE_HID
516 case CONTEXT_USB_HID
:
517 return remote_button_context_usb_hid
;
518 case CONTEXT_USB_HID_MODE_MULTIMEDIA
:
519 return remote_button_context_usb_hid_mode_multimedia
;
520 case CONTEXT_USB_HID_MODE_PRESENTATION
:
521 return remote_button_context_usb_hid_mode_presentation
;
522 case CONTEXT_USB_HID_MODE_BROWSER
:
523 return remote_button_context_usb_hid_mode_browser
;
524 #ifdef HAVE_USB_HID_MOUSE
525 case CONTEXT_USB_HID_MODE_MOUSE
:
526 return remote_button_context_usb_hid_mode_mouse
;
530 return remote_button_context_standard
;
533 const struct button_mapping
* get_context_mapping(int context
)
535 if (context
&CONTEXT_REMOTE
)
536 return get_context_mapping_remote(context
);
541 return button_context_standard
;
543 return button_context_wps
;
546 return button_context_list
;
547 case CONTEXT_MAINMENU
:
549 if (global_settings
.hold_lr_for_scroll_in_list
)
550 return button_context_listtree_scroll_without_combo
;
552 return button_context_listtree_scroll_with_combo
;
553 case CONTEXT_CUSTOM
|CONTEXT_TREE
:
554 return button_context_tree
;
556 case CONTEXT_SETTINGS
:
557 return button_context_settings
;
558 case CONTEXT_CUSTOM
|CONTEXT_SETTINGS
:
559 return button_context_settings_right_is_inc
;
561 case CONTEXT_SETTINGS_COLOURCHOOSER
:
562 return button_context_colorchooser
;
563 case CONTEXT_SETTINGS_EQ
:
564 return button_context_eq
;
566 case CONTEXT_SETTINGS_TIME
:
567 return button_context_time
;
569 case CONTEXT_YESNOSCREEN
:
570 return button_context_yesno
;
571 case CONTEXT_BOOKMARKSCREEN
:
572 return button_context_bmark
;
573 case CONTEXT_QUICKSCREEN
:
574 return button_context_quickscreen
;
575 case CONTEXT_PITCHSCREEN
:
576 return button_context_pitchscreen
;
577 case CONTEXT_KEYBOARD
:
578 case CONTEXT_MORSE_INPUT
:
579 return button_context_keyboard
;
580 #ifdef USB_ENABLE_HID
581 case CONTEXT_USB_HID
:
582 return button_context_usb_hid
;
583 case CONTEXT_USB_HID_MODE_MULTIMEDIA
:
584 return button_context_usb_hid_mode_multimedia
;
585 case CONTEXT_USB_HID_MODE_PRESENTATION
:
586 return button_context_usb_hid_mode_presentation
;
587 case CONTEXT_USB_HID_MODE_BROWSER
:
588 return button_context_usb_hid_mode_browser
;
589 #ifdef HAVE_USB_HID_MOUSE
590 case CONTEXT_USB_HID_MODE_MOUSE
:
591 return button_context_usb_hid_mode_mouse
;
595 return button_context_standard
;