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_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
},
122 { ACTION_TREE_HOTKEY
, BUTTON_DISPLAY
|BUTTON_MENU
, BUTTON_NONE
},
124 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST
)
125 }; /* button_context_tree */
127 static const struct button_mapping button_context_listtree_scroll_with_combo
[] = {
128 { ACTION_NONE
, BUTTON_DISPLAY
, BUTTON_NONE
},
129 { ACTION_TREE_PGLEFT
, BUTTON_DISPLAY
|BUTTON_LEFT
, BUTTON_DISPLAY
},
130 { ACTION_TREE_PGLEFT
, BUTTON_LEFT
|BUTTON_REL
, BUTTON_DISPLAY
|BUTTON_LEFT
},
131 { ACTION_TREE_PGLEFT
, BUTTON_DISPLAY
|BUTTON_LEFT
, BUTTON_LEFT
|BUTTON_REL
},
132 { ACTION_TREE_ROOT_INIT
, BUTTON_DISPLAY
|BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_DISPLAY
|BUTTON_LEFT
},
133 { ACTION_TREE_PGLEFT
, BUTTON_DISPLAY
|BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
134 { ACTION_TREE_PGRIGHT
, BUTTON_DISPLAY
|BUTTON_RIGHT
, BUTTON_DISPLAY
},
135 { ACTION_TREE_PGRIGHT
, BUTTON_RIGHT
|BUTTON_REL
, BUTTON_DISPLAY
|BUTTON_RIGHT
},
136 { ACTION_TREE_PGRIGHT
, BUTTON_DISPLAY
|BUTTON_RIGHT
, BUTTON_RIGHT
|BUTTON_REL
},
137 { ACTION_TREE_PGRIGHT
, BUTTON_DISPLAY
|BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
139 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM
|CONTEXT_TREE
),
142 static const struct button_mapping button_context_listtree_scroll_without_combo
[] = {
143 { ACTION_NONE
, BUTTON_LEFT
, BUTTON_NONE
},
144 { ACTION_STD_CANCEL
, BUTTON_LEFT
|BUTTON_REL
, BUTTON_LEFT
},
145 { ACTION_TREE_ROOT_INIT
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_LEFT
},
146 { ACTION_TREE_PGLEFT
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
147 { ACTION_TREE_PGLEFT
, BUTTON_LEFT
|BUTTON_REL
, BUTTON_LEFT
|BUTTON_REPEAT
},
148 { ACTION_NONE
, BUTTON_RIGHT
, BUTTON_NONE
},
149 { ACTION_STD_OK
, BUTTON_RIGHT
|BUTTON_REL
, BUTTON_RIGHT
},
150 { ACTION_TREE_PGRIGHT
, BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
151 { ACTION_TREE_PGRIGHT
, BUTTON_RIGHT
|BUTTON_REL
, BUTTON_RIGHT
|BUTTON_REPEAT
},
152 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM
|CONTEXT_TREE
),
155 static const struct button_mapping button_context_settings
[] = {
156 { ACTION_SETTINGS_INC
, BUTTON_UP
, BUTTON_NONE
},
157 { ACTION_SETTINGS_INCREPEAT
,BUTTON_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
158 { ACTION_SETTINGS_DEC
, BUTTON_DOWN
, BUTTON_NONE
},
159 { ACTION_SETTINGS_DECREPEAT
,BUTTON_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
160 { ACTION_STD_PREV
, BUTTON_LEFT
, BUTTON_NONE
},
161 { ACTION_STD_PREVREPEAT
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
162 { ACTION_STD_NEXT
, BUTTON_RIGHT
, BUTTON_NONE
},
163 { ACTION_STD_NEXTREPEAT
, BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
164 { ACTION_SETTINGS_RESET
, BUTTON_DISPLAY
, BUTTON_NONE
},
166 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
167 }; /* button_context_settings */
169 static const struct button_mapping button_context_settings_right_is_inc
[] = {
170 { ACTION_SETTINGS_INC
, BUTTON_RIGHT
, BUTTON_NONE
},
171 { ACTION_SETTINGS_INCREPEAT
,BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
172 { ACTION_SETTINGS_DEC
, BUTTON_LEFT
, BUTTON_NONE
},
173 { ACTION_SETTINGS_DECREPEAT
,BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
174 { ACTION_STD_PREV
, BUTTON_UP
, BUTTON_NONE
},
175 { ACTION_STD_PREVREPEAT
, BUTTON_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
176 { ACTION_STD_NEXT
, BUTTON_DOWN
, BUTTON_NONE
},
177 { ACTION_STD_NEXTREPEAT
, BUTTON_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
178 { ACTION_SETTINGS_RESET
, BUTTON_DISPLAY
, BUTTON_NONE
},
180 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
181 }; /* button_context_settingsgraphical */
183 static const struct button_mapping button_context_yesno
[] = {
184 { ACTION_YESNO_ACCEPT
, BUTTON_SELECT
, BUTTON_NONE
},
186 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
187 }; /* button_context_settings_yesno */
189 static const struct button_mapping button_context_colorchooser
[] = {
190 { ACTION_STD_OK
, BUTTON_DISPLAY
|BUTTON_REL
, BUTTON_NONE
},
192 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM
|CONTEXT_SETTINGS
),
193 }; /* button_context_colorchooser */
195 static const struct button_mapping button_context_eq
[] = {
196 { ACTION_STD_OK
, BUTTON_SELECT
|BUTTON_REL
, BUTTON_NONE
},
198 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM
|CONTEXT_SETTINGS
),
199 }; /* button_context_eq */
201 /** Bookmark Screen **/
202 static const struct button_mapping button_context_bmark
[] = {
203 { ACTION_BMS_DELETE
, BUTTON_DISPLAY
, BUTTON_NONE
},
205 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST
),
206 }; /* button_context_bmark */
208 static const struct button_mapping button_context_time
[] = {
209 { ACTION_STD_CANCEL
, BUTTON_POWER
, BUTTON_NONE
},
210 { ACTION_STD_OK
, BUTTON_DISPLAY
, BUTTON_NONE
},
212 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS
),
213 }; /* button_context_time */
215 static const struct button_mapping button_context_quickscreen
[] = {
216 { ACTION_QS_TOP
, BUTTON_UP
, BUTTON_NONE
},
217 { ACTION_QS_TOP
, BUTTON_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
218 { ACTION_QS_DOWN
, BUTTON_DOWN
, BUTTON_NONE
},
219 { ACTION_QS_DOWN
, BUTTON_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
220 { ACTION_QS_LEFT
, BUTTON_LEFT
, BUTTON_NONE
},
221 { ACTION_QS_LEFT
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
222 { ACTION_QS_RIGHT
, BUTTON_RIGHT
, BUTTON_NONE
},
223 { ACTION_QS_RIGHT
, BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
224 { ACTION_STD_CANCEL
, BUTTON_MENU
, BUTTON_NONE
},
226 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
227 }; /* button_context_quickscreen */
229 static const struct button_mapping button_context_pitchscreen
[] = {
230 { ACTION_PS_INC_SMALL
, BUTTON_UP
, BUTTON_NONE
},
231 { ACTION_PS_INC_BIG
, BUTTON_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
232 { ACTION_PS_DEC_SMALL
, BUTTON_DOWN
, BUTTON_NONE
},
233 { ACTION_PS_DEC_BIG
, BUTTON_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
234 { ACTION_PS_NUDGE_LEFT
, BUTTON_LEFT
, BUTTON_NONE
},
235 { ACTION_PS_NUDGE_LEFTOFF
, BUTTON_LEFT
|BUTTON_REL
, BUTTON_NONE
},
236 { ACTION_PS_NUDGE_RIGHT
, BUTTON_RIGHT
, BUTTON_NONE
},
237 { ACTION_PS_NUDGE_RIGHTOFF
, BUTTON_RIGHT
|BUTTON_REL
, BUTTON_NONE
},
238 { ACTION_PS_TOGGLE_MODE
, BUTTON_MENU
, BUTTON_NONE
},
239 { ACTION_PS_RESET
, BUTTON_DISPLAY
, BUTTON_NONE
},
240 { ACTION_PS_EXIT
, BUTTON_PLAY
, BUTTON_NONE
},
241 { ACTION_PS_SLOWER
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
242 { ACTION_PS_FASTER
, BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
244 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
245 }; /* button_context_pitchcreen */
247 static const struct button_mapping button_context_keyboard
[] = {
248 { ACTION_KBD_LEFT
, BUTTON_LEFT
, BUTTON_NONE
},
249 { ACTION_KBD_LEFT
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
250 { ACTION_KBD_RIGHT
, BUTTON_RIGHT
, BUTTON_NONE
},
251 { ACTION_KBD_RIGHT
, BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
252 { ACTION_KBD_CURSOR_LEFT
, BUTTON_DISPLAY
|BUTTON_LEFT
, BUTTON_NONE
},
253 { ACTION_KBD_CURSOR_LEFT
, BUTTON_DISPLAY
|BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
254 { ACTION_KBD_CURSOR_RIGHT
, BUTTON_DISPLAY
|BUTTON_RIGHT
, BUTTON_NONE
},
255 { ACTION_KBD_CURSOR_RIGHT
, BUTTON_DISPLAY
|BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
256 { ACTION_KBD_SELECT
, BUTTON_SELECT
, BUTTON_NONE
},
257 { ACTION_KBD_PAGE_FLIP
, BUTTON_DISPLAY
|BUTTON_MENU
, BUTTON_NONE
},
258 { ACTION_KBD_DONE
, BUTTON_DISPLAY
|BUTTON_REL
, BUTTON_DISPLAY
},
259 { ACTION_KBD_ABORT
, BUTTON_POWER
|BUTTON_REL
, BUTTON_POWER
},
260 { ACTION_KBD_BACKSPACE
, BUTTON_MENU
, BUTTON_NONE
},
261 { ACTION_KBD_BACKSPACE
, BUTTON_MENU
|BUTTON_REPEAT
, BUTTON_NONE
},
262 { ACTION_KBD_UP
, BUTTON_UP
, BUTTON_NONE
},
263 { ACTION_KBD_UP
, BUTTON_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
264 { ACTION_KBD_DOWN
, BUTTON_DOWN
, BUTTON_NONE
},
265 { ACTION_KBD_DOWN
, BUTTON_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
266 { ACTION_KBD_MORSE_INPUT
, BUTTON_DISPLAY
|BUTTON_POWER
, BUTTON_NONE
},
267 { ACTION_KBD_MORSE_SELECT
, BUTTON_SELECT
|BUTTON_REL
, BUTTON_NONE
},
270 }; /* button_context_keyboard */
272 /*****************************************************************************
273 * Remote control mappings
274 *****************************************************************************/
276 static const struct button_mapping remote_button_context_standard
[] = {
277 { ACTION_STD_PREV
, BUTTON_RC_PLAY
, BUTTON_NONE
},
278 { ACTION_STD_PREVREPEAT
, BUTTON_RC_PLAY
|BUTTON_REPEAT
, BUTTON_NONE
},
279 { ACTION_STD_NEXT
, BUTTON_RC_DOWN
, BUTTON_NONE
},
280 { ACTION_STD_NEXTREPEAT
, BUTTON_RC_DOWN
|BUTTON_REPEAT
,BUTTON_NONE
},
281 { ACTION_STD_CANCEL
, BUTTON_RC_REW
, BUTTON_NONE
},
282 { ACTION_STD_OK
, BUTTON_RC_FF
|BUTTON_REL
, BUTTON_RC_FF
},
283 { ACTION_STD_CONTEXT
, BUTTON_RC_FF
|BUTTON_REPEAT
, BUTTON_RC_FF
},
284 { ACTION_STD_MENU
, BUTTON_RC_HEART
, BUTTON_NONE
},
289 static const struct button_mapping remote_button_context_wps
[] = {
290 { ACTION_WPS_PLAY
, BUTTON_RC_PLAY
, BUTTON_NONE
},
292 { ACTION_WPS_SKIPNEXT
, BUTTON_RC_FF
|BUTTON_REL
, BUTTON_RC_FF
},
293 { ACTION_WPS_SKIPPREV
, BUTTON_RC_REW
|BUTTON_REL
, BUTTON_RC_REW
},
295 { ACTION_WPS_SEEKBACK
, BUTTON_RC_REW
|BUTTON_REPEAT
, BUTTON_NONE
},
296 { ACTION_WPS_SEEKFWD
, BUTTON_RC_FF
|BUTTON_REPEAT
, BUTTON_NONE
},
297 { ACTION_WPS_STOPSEEK
, BUTTON_RC_REW
|BUTTON_REL
, BUTTON_RC_REW
|BUTTON_REPEAT
},
298 { ACTION_WPS_STOPSEEK
, BUTTON_RC_FF
|BUTTON_REL
, BUTTON_RC_FF
|BUTTON_REPEAT
},
300 { ACTION_WPS_STOP
, BUTTON_RC_PLAY
|BUTTON_REPEAT
, BUTTON_RC_PLAY
},
301 { ACTION_WPS_MENU
, BUTTON_RC_HEART
, BUTTON_NONE
},
303 { ACTION_WPS_VOLDOWN
, BUTTON_RC_VOL_DOWN
, BUTTON_NONE
},
304 { ACTION_WPS_VOLDOWN
, BUTTON_RC_VOL_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
305 { ACTION_WPS_VOLUP
, BUTTON_RC_VOL_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
306 { ACTION_WPS_VOLUP
, BUTTON_RC_VOL_UP
, BUTTON_NONE
},
308 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
311 static const struct button_mapping remote_button_context_tree
[] = {
312 { ACTION_TREE_WPS
, BUTTON_RC_PLAY
|BUTTON_REL
, BUTTON_RC_PLAY
},
313 { ACTION_TREE_STOP
, BUTTON_RC_PLAY
|BUTTON_REPEAT
, BUTTON_RC_PLAY
},
314 { ACTION_STD_CANCEL
, BUTTON_RC_REW
|BUTTON_REPEAT
, BUTTON_NONE
},
316 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
319 #ifdef USB_ENABLE_HID
320 static const struct button_mapping button_context_usb_hid
[] = {
321 { ACTION_USB_HID_MODE_SWITCH_NEXT
, BUTTON_POWER
|BUTTON_REL
, BUTTON_POWER
},
322 { ACTION_USB_HID_MODE_SWITCH_PREV
, BUTTON_POWER
|BUTTON_REPEAT
, BUTTON_POWER
},
325 }; /* button_context_usb_hid */
327 static const struct button_mapping button_context_usb_hid_mode_multimedia
[] = {
328 { ACTION_USB_HID_MULTIMEDIA_VOLUME_DOWN
, BUTTON_DOWN
, BUTTON_NONE
},
329 { ACTION_USB_HID_MULTIMEDIA_VOLUME_DOWN
, BUTTON_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
330 { ACTION_USB_HID_MULTIMEDIA_VOLUME_UP
, BUTTON_UP
, BUTTON_NONE
},
331 { ACTION_USB_HID_MULTIMEDIA_VOLUME_UP
, BUTTON_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
332 { ACTION_USB_HID_MULTIMEDIA_VOLUME_MUTE
, BUTTON_SELECT
|BUTTON_REL
, BUTTON_SELECT
},
333 { ACTION_USB_HID_MULTIMEDIA_PLAYBACK_PLAY_PAUSE
, BUTTON_PLAY
|BUTTON_REL
, BUTTON_PLAY
},
334 { ACTION_USB_HID_MULTIMEDIA_PLAYBACK_STOP
, BUTTON_DISPLAY
|BUTTON_REL
, BUTTON_DISPLAY
},
335 { ACTION_USB_HID_MULTIMEDIA_PLAYBACK_STOP
, BUTTON_PLAY
|BUTTON_REPEAT
, BUTTON_PLAY
},
336 { ACTION_USB_HID_MULTIMEDIA_PLAYBACK_TRACK_PREV
, BUTTON_LEFT
|BUTTON_REL
, BUTTON_LEFT
},
337 { ACTION_USB_HID_MULTIMEDIA_PLAYBACK_TRACK_NEXT
, BUTTON_RIGHT
|BUTTON_REL
, BUTTON_RIGHT
},
339 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_USB_HID
)
340 }; /* button_context_usb_hid_mode_multimedia */
342 static const struct button_mapping button_context_usb_hid_mode_presentation
[] = {
343 { ACTION_USB_HID_PRESENTATION_SLIDESHOW_START
, BUTTON_PLAY
|BUTTON_REL
, BUTTON_PLAY
},
344 { ACTION_USB_HID_PRESENTATION_SLIDESHOW_LEAVE
, BUTTON_DISPLAY
|BUTTON_REL
, BUTTON_DISPLAY
},
345 { ACTION_USB_HID_PRESENTATION_SLIDESHOW_LEAVE
, BUTTON_PLAY
|BUTTON_REPEAT
, BUTTON_PLAY
},
346 { ACTION_USB_HID_PRESENTATION_SLIDE_PREV
, BUTTON_LEFT
|BUTTON_REL
, BUTTON_LEFT
},
347 { ACTION_USB_HID_PRESENTATION_SLIDE_NEXT
, BUTTON_RIGHT
|BUTTON_REL
, BUTTON_RIGHT
},
348 { ACTION_USB_HID_PRESENTATION_SLIDE_FIRST
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_LEFT
},
349 { ACTION_USB_HID_PRESENTATION_SLIDE_LAST
, BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_RIGHT
},
350 { ACTION_USB_HID_PRESENTATION_SCREEN_BLACK
, BUTTON_DOWN
|BUTTON_REL
, BUTTON_DOWN
},
351 { ACTION_USB_HID_PRESENTATION_SCREEN_WHITE
, BUTTON_DOWN
|BUTTON_REPEAT
, BUTTON_DOWN
},
352 { ACTION_USB_HID_PRESENTATION_LINK_PREV
, BUTTON_UP
, BUTTON_NONE
},
353 { ACTION_USB_HID_PRESENTATION_LINK_PREV
, BUTTON_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
354 { ACTION_USB_HID_PRESENTATION_LINK_NEXT
, BUTTON_DOWN
, BUTTON_NONE
},
355 { ACTION_USB_HID_PRESENTATION_LINK_NEXT
, BUTTON_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
356 { ACTION_USB_HID_PRESENTATION_MOUSE_CLICK
, BUTTON_SELECT
|BUTTON_REL
, BUTTON_SELECT
},
357 { ACTION_USB_HID_PRESENTATION_MOUSE_OVER
, BUTTON_SELECT
|BUTTON_REPEAT
, BUTTON_SELECT
},
359 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_USB_HID
)
360 }; /* button_context_usb_hid_mode_presentation */
362 static const struct button_mapping button_context_usb_hid_mode_browser
[] = {
363 { ACTION_USB_HID_BROWSER_SCROLL_UP
, BUTTON_UP
, BUTTON_NONE
},
364 { ACTION_USB_HID_BROWSER_SCROLL_UP
, BUTTON_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
365 { ACTION_USB_HID_BROWSER_SCROLL_DOWN
, BUTTON_DOWN
, BUTTON_NONE
},
366 { ACTION_USB_HID_BROWSER_SCROLL_DOWN
, BUTTON_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
367 { ACTION_USB_HID_BROWSER_SCROLL_PAGE_UP
, BUTTON_PLAY
|BUTTON_REL
, BUTTON_PLAY
},
368 { ACTION_USB_HID_BROWSER_SCROLL_PAGE_DOWN
, BUTTON_MENU
|BUTTON_REL
, BUTTON_MENU
},
369 { ACTION_USB_HID_BROWSER_ZOOM_IN
, BUTTON_PLAY
|BUTTON_REPEAT
, BUTTON_PLAY
},
370 { ACTION_USB_HID_BROWSER_ZOOM_OUT
, BUTTON_MENU
|BUTTON_REPEAT
, BUTTON_MENU
},
371 { ACTION_USB_HID_BROWSER_ZOOM_RESET
, BUTTON_SELECT
|BUTTON_REPEAT
, BUTTON_SELECT
},
372 { ACTION_USB_HID_BROWSER_ZOOM_RESET
, BUTTON_PLAY
|BUTTON_MENU
|BUTTON_REPEAT
, BUTTON_PLAY
|BUTTON_MENU
},
373 { ACTION_USB_HID_BROWSER_TAB_PREV
, BUTTON_LEFT
|BUTTON_REL
, BUTTON_LEFT
},
374 { ACTION_USB_HID_BROWSER_TAB_NEXT
, BUTTON_RIGHT
|BUTTON_REL
, BUTTON_RIGHT
},
375 { ACTION_USB_HID_BROWSER_TAB_CLOSE
, BUTTON_DISPLAY
|BUTTON_REPEAT
, BUTTON_DISPLAY
},
376 { ACTION_USB_HID_BROWSER_HISTORY_BACK
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_LEFT
},
377 { ACTION_USB_HID_BROWSER_HISTORY_FORWARD
, BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_RIGHT
},
378 { ACTION_USB_HID_BROWSER_VIEW_FULL_SCREEN
, BUTTON_SELECT
|BUTTON_REL
, BUTTON_SELECT
},
380 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_USB_HID
)
381 }; /* button_context_usb_hid_mode_browser */
383 #ifdef HAVE_USB_HID_MOUSE
384 static const struct button_mapping button_context_usb_hid_mode_mouse
[] = {
385 { ACTION_USB_HID_MOUSE_UP
, BUTTON_UP
, BUTTON_NONE
},
386 { ACTION_USB_HID_MOUSE_UP_REP
, BUTTON_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
387 { ACTION_USB_HID_MOUSE_DOWN
, BUTTON_DOWN
, BUTTON_NONE
},
388 { ACTION_USB_HID_MOUSE_DOWN_REP
, BUTTON_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
389 { ACTION_USB_HID_MOUSE_LEFT
, BUTTON_LEFT
, BUTTON_NONE
},
390 { ACTION_USB_HID_MOUSE_LEFT_REP
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
391 { ACTION_USB_HID_MOUSE_RIGHT
, BUTTON_RIGHT
, BUTTON_NONE
},
392 { ACTION_USB_HID_MOUSE_RIGHT_REP
, BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
393 { ACTION_USB_HID_MOUSE_BUTTON_LEFT
, BUTTON_MENU
, BUTTON_NONE
},
394 { ACTION_USB_HID_MOUSE_BUTTON_LEFT_REL
, BUTTON_MENU
|BUTTON_REL
, BUTTON_NONE
},
395 { ACTION_USB_HID_MOUSE_LDRAG_UP
, BUTTON_MENU
|BUTTON_UP
, BUTTON_NONE
},
396 { ACTION_USB_HID_MOUSE_LDRAG_UP_REP
, BUTTON_MENU
|BUTTON_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
397 { ACTION_USB_HID_MOUSE_LDRAG_DOWN
, BUTTON_MENU
|BUTTON_DOWN
, BUTTON_NONE
},
398 { ACTION_USB_HID_MOUSE_LDRAG_DOWN_REP
, BUTTON_MENU
|BUTTON_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
399 { ACTION_USB_HID_MOUSE_LDRAG_LEFT
, BUTTON_MENU
|BUTTON_LEFT
, BUTTON_NONE
},
400 { ACTION_USB_HID_MOUSE_LDRAG_LEFT_REP
, BUTTON_MENU
|BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
401 { ACTION_USB_HID_MOUSE_LDRAG_RIGHT
, BUTTON_MENU
|BUTTON_RIGHT
, BUTTON_NONE
},
402 { ACTION_USB_HID_MOUSE_LDRAG_RIGHT_REP
, BUTTON_MENU
|BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
403 { ACTION_USB_HID_MOUSE_BUTTON_RIGHT
, BUTTON_PLAY
, BUTTON_NONE
},
404 { ACTION_USB_HID_MOUSE_BUTTON_RIGHT_REL
, BUTTON_PLAY
|BUTTON_REL
, BUTTON_NONE
},
405 { ACTION_USB_HID_MOUSE_RDRAG_UP
, BUTTON_PLAY
|BUTTON_UP
, BUTTON_NONE
},
406 { ACTION_USB_HID_MOUSE_RDRAG_UP_REP
, BUTTON_PLAY
|BUTTON_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
407 { ACTION_USB_HID_MOUSE_RDRAG_DOWN
, BUTTON_PLAY
|BUTTON_DOWN
, BUTTON_NONE
},
408 { ACTION_USB_HID_MOUSE_RDRAG_DOWN_REP
, BUTTON_PLAY
|BUTTON_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
409 { ACTION_USB_HID_MOUSE_RDRAG_LEFT
, BUTTON_PLAY
|BUTTON_LEFT
, BUTTON_NONE
},
410 { ACTION_USB_HID_MOUSE_RDRAG_LEFT_REP
, BUTTON_PLAY
|BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
411 { ACTION_USB_HID_MOUSE_RDRAG_RIGHT
, BUTTON_PLAY
|BUTTON_RIGHT
, BUTTON_NONE
},
412 { ACTION_USB_HID_MOUSE_RDRAG_RIGHT_REP
, BUTTON_PLAY
|BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
413 { ACTION_USB_HID_MOUSE_WHEEL_SCROLL_UP
, BUTTON_UP
, BUTTON_NONE
},
414 { ACTION_USB_HID_MOUSE_WHEEL_SCROLL_UP
, BUTTON_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
415 { ACTION_USB_HID_MOUSE_WHEEL_SCROLL_DOWN
, BUTTON_DOWN
, BUTTON_NONE
},
416 { ACTION_USB_HID_MOUSE_WHEEL_SCROLL_DOWN
, BUTTON_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
418 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_USB_HID
)
419 }; /* button_context_usb_hid_mode_mouse */
422 static const struct button_mapping remote_button_context_usb_hid
[] = {
423 { ACTION_USB_HID_MODE_SWITCH_NEXT
, BUTTON_RC_MODE
|BUTTON_REL
, BUTTON_RC_MODE
},
424 { ACTION_USB_HID_MODE_SWITCH_PREV
, BUTTON_RC_MODE
|BUTTON_REPEAT
, BUTTON_RC_MODE
},
427 }; /* remote_button_context_usb_hid */
429 static const struct button_mapping remote_button_context_usb_hid_mode_multimedia
[] = {
430 { ACTION_USB_HID_MULTIMEDIA_VOLUME_DOWN
, BUTTON_RC_VOL_DOWN
, BUTTON_NONE
},
431 { ACTION_USB_HID_MULTIMEDIA_VOLUME_DOWN
, BUTTON_RC_VOL_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
432 { ACTION_USB_HID_MULTIMEDIA_VOLUME_UP
, BUTTON_RC_VOL_UP
, BUTTON_NONE
},
433 { ACTION_USB_HID_MULTIMEDIA_VOLUME_UP
, BUTTON_RC_VOL_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
434 { ACTION_USB_HID_MULTIMEDIA_VOLUME_MUTE
, BUTTON_RC_HEART
|BUTTON_REL
, BUTTON_RC_HEART
},
435 { ACTION_USB_HID_MULTIMEDIA_PLAYBACK_PLAY_PAUSE
, BUTTON_RC_PLAY
|BUTTON_REL
, BUTTON_RC_PLAY
},
436 { ACTION_USB_HID_MULTIMEDIA_PLAYBACK_STOP
, BUTTON_RC_DOWN
|BUTTON_REL
, BUTTON_RC_DOWN
},
437 { ACTION_USB_HID_MULTIMEDIA_PLAYBACK_STOP
, BUTTON_RC_PLAY
|BUTTON_REPEAT
, BUTTON_RC_PLAY
},
438 { ACTION_USB_HID_MULTIMEDIA_PLAYBACK_TRACK_PREV
, BUTTON_RC_REW
|BUTTON_REL
, BUTTON_RC_REW
},
439 { ACTION_USB_HID_MULTIMEDIA_PLAYBACK_TRACK_NEXT
, BUTTON_RC_FF
|BUTTON_REL
, BUTTON_RC_FF
},
441 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_USB_HID
)
442 }; /* remote_button_context_usb_hid_mode_multimedia */
444 static const struct button_mapping remote_button_context_usb_hid_mode_presentation
[] = {
445 { ACTION_USB_HID_PRESENTATION_SLIDESHOW_START
, BUTTON_RC_PLAY
|BUTTON_REL
, BUTTON_RC_PLAY
},
446 { ACTION_USB_HID_PRESENTATION_SLIDESHOW_LEAVE
, BUTTON_RC_PLAY
|BUTTON_REPEAT
, BUTTON_RC_PLAY
},
447 { ACTION_USB_HID_PRESENTATION_SLIDE_PREV
, BUTTON_RC_REW
|BUTTON_REL
, BUTTON_RC_REW
},
448 { ACTION_USB_HID_PRESENTATION_SLIDE_NEXT
, BUTTON_RC_FF
|BUTTON_REL
, BUTTON_RC_FF
},
449 { ACTION_USB_HID_PRESENTATION_SLIDE_FIRST
, BUTTON_RC_REW
|BUTTON_REPEAT
, BUTTON_RC_REW
},
450 { ACTION_USB_HID_PRESENTATION_SLIDE_LAST
, BUTTON_RC_FF
|BUTTON_REPEAT
, BUTTON_RC_FF
},
451 { ACTION_USB_HID_PRESENTATION_SCREEN_BLACK
, BUTTON_RC_DOWN
|BUTTON_REL
, BUTTON_RC_DOWN
},
452 { ACTION_USB_HID_PRESENTATION_SCREEN_WHITE
, BUTTON_RC_DOWN
|BUTTON_REPEAT
, BUTTON_RC_DOWN
},
453 { ACTION_USB_HID_PRESENTATION_LINK_PREV
, BUTTON_RC_VOL_UP
, BUTTON_NONE
},
454 { ACTION_USB_HID_PRESENTATION_LINK_PREV
, BUTTON_RC_VOL_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
455 { ACTION_USB_HID_PRESENTATION_LINK_NEXT
, BUTTON_RC_VOL_DOWN
, BUTTON_NONE
},
456 { ACTION_USB_HID_PRESENTATION_LINK_NEXT
, BUTTON_RC_VOL_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
457 { ACTION_USB_HID_PRESENTATION_MOUSE_CLICK
, BUTTON_RC_HEART
|BUTTON_REL
, BUTTON_RC_HEART
},
458 { ACTION_USB_HID_PRESENTATION_MOUSE_OVER
, BUTTON_RC_HEART
|BUTTON_REPEAT
, BUTTON_RC_HEART
},
460 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_USB_HID
)
461 }; /* remote_button_context_usb_hid_mode_presentation */
463 static const struct button_mapping remote_button_context_usb_hid_mode_browser
[] = {
464 { ACTION_USB_HID_BROWSER_SCROLL_UP
, BUTTON_RC_VOL_UP
, BUTTON_NONE
},
465 { ACTION_USB_HID_BROWSER_SCROLL_UP
, BUTTON_RC_VOL_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
466 { ACTION_USB_HID_BROWSER_SCROLL_DOWN
, BUTTON_RC_VOL_DOWN
, BUTTON_NONE
},
467 { ACTION_USB_HID_BROWSER_SCROLL_DOWN
, BUTTON_RC_VOL_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
468 { ACTION_USB_HID_BROWSER_SCROLL_PAGE_UP
, BUTTON_RC_PLAY
|BUTTON_REL
, BUTTON_RC_PLAY
},
469 { ACTION_USB_HID_BROWSER_SCROLL_PAGE_DOWN
, BUTTON_RC_DOWN
|BUTTON_REL
, BUTTON_RC_DOWN
},
470 { ACTION_USB_HID_BROWSER_ZOOM_IN
, BUTTON_RC_PLAY
|BUTTON_REPEAT
, BUTTON_RC_PLAY
},
471 { ACTION_USB_HID_BROWSER_ZOOM_OUT
, BUTTON_RC_DOWN
|BUTTON_REPEAT
, BUTTON_RC_DOWN
},
472 { ACTION_USB_HID_BROWSER_ZOOM_RESET
, BUTTON_RC_HEART
|BUTTON_REPEAT
, BUTTON_RC_HEART
},
473 { ACTION_USB_HID_BROWSER_TAB_PREV
, BUTTON_RC_REW
|BUTTON_REL
, BUTTON_RC_REW
},
474 { ACTION_USB_HID_BROWSER_TAB_NEXT
, BUTTON_RC_FF
|BUTTON_REL
, BUTTON_RC_FF
},
475 { ACTION_USB_HID_BROWSER_HISTORY_BACK
, BUTTON_RC_REW
|BUTTON_REPEAT
, BUTTON_RC_REW
},
476 { ACTION_USB_HID_BROWSER_HISTORY_FORWARD
, BUTTON_RC_FF
|BUTTON_REPEAT
, BUTTON_RC_FF
},
477 { ACTION_USB_HID_BROWSER_VIEW_FULL_SCREEN
, BUTTON_RC_HEART
|BUTTON_REL
, BUTTON_RC_HEART
},
479 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_USB_HID
)
480 }; /* remote_button_context_usb_hid_mode_browser */
482 #ifdef HAVE_USB_HID_MOUSE
483 static const struct button_mapping remote_button_context_usb_hid_mode_mouse
[] = {
484 { ACTION_USB_HID_MOUSE_UP
, BUTTON_RC_PLAY
, BUTTON_NONE
},
485 { ACTION_USB_HID_MOUSE_UP_REP
, BUTTON_RC_PLAY
|BUTTON_REPEAT
, BUTTON_NONE
},
486 { ACTION_USB_HID_MOUSE_DOWN
, BUTTON_RC_DOWN
, BUTTON_NONE
},
487 { ACTION_USB_HID_MOUSE_DOWN_REP
, BUTTON_RC_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
488 { ACTION_USB_HID_MOUSE_LEFT
, BUTTON_RC_REW
, BUTTON_NONE
},
489 { ACTION_USB_HID_MOUSE_LEFT_REP
, BUTTON_RC_REW
|BUTTON_REPEAT
, BUTTON_NONE
},
490 { ACTION_USB_HID_MOUSE_RIGHT
, BUTTON_RC_FF
, BUTTON_NONE
},
491 { ACTION_USB_HID_MOUSE_RIGHT_REP
, BUTTON_RC_FF
|BUTTON_REPEAT
, BUTTON_NONE
},
492 { ACTION_USB_HID_MOUSE_BUTTON_LEFT
, BUTTON_RC_HEART
, BUTTON_NONE
},
493 { ACTION_USB_HID_MOUSE_BUTTON_LEFT_REL
, BUTTON_RC_HEART
|BUTTON_REL
, BUTTON_NONE
},
494 { ACTION_USB_HID_MOUSE_LDRAG_UP
, BUTTON_RC_HEART
|BUTTON_RC_PLAY
, BUTTON_NONE
},
495 { ACTION_USB_HID_MOUSE_LDRAG_UP_REP
, BUTTON_RC_HEART
|BUTTON_RC_PLAY
|BUTTON_REPEAT
, BUTTON_NONE
},
496 { ACTION_USB_HID_MOUSE_LDRAG_DOWN
, BUTTON_RC_HEART
|BUTTON_RC_DOWN
, BUTTON_NONE
},
497 { ACTION_USB_HID_MOUSE_LDRAG_DOWN_REP
, BUTTON_RC_HEART
|BUTTON_RC_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
498 { ACTION_USB_HID_MOUSE_LDRAG_LEFT
, BUTTON_RC_HEART
|BUTTON_RC_REW
, BUTTON_NONE
},
499 { ACTION_USB_HID_MOUSE_LDRAG_LEFT_REP
, BUTTON_RC_HEART
|BUTTON_RC_REW
|BUTTON_REPEAT
, BUTTON_NONE
},
500 { ACTION_USB_HID_MOUSE_LDRAG_RIGHT
, BUTTON_RC_HEART
|BUTTON_RC_FF
, BUTTON_NONE
},
501 { ACTION_USB_HID_MOUSE_LDRAG_RIGHT_REP
, BUTTON_RC_HEART
|BUTTON_RC_FF
|BUTTON_REPEAT
, BUTTON_NONE
},
502 { ACTION_USB_HID_MOUSE_WHEEL_SCROLL_UP
, BUTTON_RC_VOL_UP
, BUTTON_NONE
},
503 { ACTION_USB_HID_MOUSE_WHEEL_SCROLL_UP
, BUTTON_RC_VOL_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
504 { ACTION_USB_HID_MOUSE_WHEEL_SCROLL_DOWN
, BUTTON_RC_VOL_DOWN
, BUTTON_NONE
},
505 { ACTION_USB_HID_MOUSE_WHEEL_SCROLL_DOWN
, BUTTON_RC_VOL_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
507 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_USB_HID
)
508 }; /* remote_button_context_usb_hid_mode_mouse */
512 static const struct button_mapping
* get_context_mapping_remote( int context
)
514 context
^= CONTEXT_REMOTE
;
519 return remote_button_context_wps
;
520 case CONTEXT_MAINMENU
:
522 return remote_button_context_tree
;
523 #ifdef USB_ENABLE_HID
524 case CONTEXT_USB_HID
:
525 return remote_button_context_usb_hid
;
526 case CONTEXT_USB_HID_MODE_MULTIMEDIA
:
527 return remote_button_context_usb_hid_mode_multimedia
;
528 case CONTEXT_USB_HID_MODE_PRESENTATION
:
529 return remote_button_context_usb_hid_mode_presentation
;
530 case CONTEXT_USB_HID_MODE_BROWSER
:
531 return remote_button_context_usb_hid_mode_browser
;
532 #ifdef HAVE_USB_HID_MOUSE
533 case CONTEXT_USB_HID_MODE_MOUSE
:
534 return remote_button_context_usb_hid_mode_mouse
;
538 return remote_button_context_standard
;
541 const struct button_mapping
* get_context_mapping(int context
)
543 if (context
&CONTEXT_REMOTE
)
544 return get_context_mapping_remote(context
);
549 return button_context_standard
;
551 return button_context_wps
;
554 return button_context_list
;
555 case CONTEXT_MAINMENU
:
557 if (global_settings
.hold_lr_for_scroll_in_list
)
558 return button_context_listtree_scroll_without_combo
;
560 return button_context_listtree_scroll_with_combo
;
561 case CONTEXT_CUSTOM
|CONTEXT_TREE
:
562 return button_context_tree
;
564 case CONTEXT_SETTINGS
:
565 return button_context_settings
;
566 case CONTEXT_CUSTOM
|CONTEXT_SETTINGS
:
567 return button_context_settings_right_is_inc
;
569 case CONTEXT_SETTINGS_COLOURCHOOSER
:
570 return button_context_colorchooser
;
571 case CONTEXT_SETTINGS_EQ
:
572 return button_context_eq
;
574 case CONTEXT_SETTINGS_TIME
:
575 return button_context_time
;
577 case CONTEXT_YESNOSCREEN
:
578 return button_context_yesno
;
579 case CONTEXT_BOOKMARKSCREEN
:
580 return button_context_bmark
;
581 case CONTEXT_QUICKSCREEN
:
582 return button_context_quickscreen
;
583 case CONTEXT_PITCHSCREEN
:
584 return button_context_pitchscreen
;
585 case CONTEXT_KEYBOARD
:
586 case CONTEXT_MORSE_INPUT
:
587 return button_context_keyboard
;
588 #ifdef USB_ENABLE_HID
589 case CONTEXT_USB_HID
:
590 return button_context_usb_hid
;
591 case CONTEXT_USB_HID_MODE_MULTIMEDIA
:
592 return button_context_usb_hid_mode_multimedia
;
593 case CONTEXT_USB_HID_MODE_PRESENTATION
:
594 return button_context_usb_hid_mode_presentation
;
595 case CONTEXT_USB_HID_MODE_BROWSER
:
596 return button_context_usb_hid_mode_browser
;
597 #ifdef HAVE_USB_HID_MOUSE
598 case CONTEXT_USB_HID_MODE_MOUSE
:
599 return button_context_usb_hid_mode_mouse
;
603 return button_context_standard
;