as3525*: initialize cpu_frequency correctly
[kugel-rb.git] / apps / keymaps / keymap-vibe500.c
blob0ea7dc2a137520b641064db60015dc09f5ad3375
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id:$
10 * Copyright (C) 2009 by Szymon Dziok
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 Packard Bell Vibe 500 target */
23 /* This needs from someone with the actual target! */
25 #include <stdio.h>
26 #include <string.h>
27 #include <stdlib.h>
29 #include "config.h"
30 #include "action.h"
31 #include "button.h"
32 #include "settings.h"
34 /*
35 * The format of the list is as follows
36 * { Action Code, Button code, Prereq button code }
37 * if there's no need to check the previous button's value, use BUTTON_NONE
38 * Insert LAST_ITEM_IN_LIST at the end of each mapping
40 static const struct button_mapping button_context_standard[] = {
41 { ACTION_STD_PREV, BUTTON_UP, BUTTON_NONE },
42 { ACTION_STD_PREVREPEAT, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
43 { ACTION_STD_NEXT, BUTTON_DOWN, BUTTON_NONE },
44 { ACTION_STD_NEXTREPEAT, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
45 { ACTION_STD_CANCEL, BUTTON_PREV, BUTTON_NONE },
46 { ACTION_STD_CANCEL, BUTTON_CANCEL|BUTTON_REL, BUTTON_NONE },
47 { ACTION_STD_OK, BUTTON_NEXT, BUTTON_NONE },
48 { ACTION_STD_OK, BUTTON_OK|BUTTON_REL, BUTTON_OK },
49 { ACTION_STD_MENU, BUTTON_MENU|BUTTON_REL, BUTTON_MENU },
50 { ACTION_STD_QUICKSCREEN, BUTTON_OK|BUTTON_REPEAT, BUTTON_OK },
51 { ACTION_STD_CONTEXT, BUTTON_MENU|BUTTON_REPEAT, BUTTON_MENU },
53 LAST_ITEM_IN_LIST
54 }; /* button_context_standard */
56 static const struct button_mapping button_context_wps[] = {
57 { ACTION_WPS_PLAY, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY },
58 { ACTION_WPS_STOP, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_PLAY },
59 { ACTION_WPS_SKIPPREV, BUTTON_PREV|BUTTON_REL, BUTTON_PREV },
60 { ACTION_WPS_SEEKBACK, BUTTON_PREV|BUTTON_REPEAT, BUTTON_NONE },
61 { ACTION_WPS_STOPSEEK, BUTTON_PREV|BUTTON_REL, BUTTON_PREV|BUTTON_REPEAT },
62 { ACTION_WPS_SKIPNEXT, BUTTON_NEXT|BUTTON_REL, BUTTON_NEXT },
63 { ACTION_WPS_SEEKFWD, BUTTON_NEXT|BUTTON_REPEAT, BUTTON_NONE },
64 { ACTION_WPS_STOPSEEK, BUTTON_NEXT|BUTTON_REL, BUTTON_NEXT|BUTTON_REPEAT },
65 { ACTION_WPS_VOLDOWN, BUTTON_DOWN, BUTTON_NONE },
66 { ACTION_WPS_VOLDOWN, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
67 { ACTION_WPS_VOLUP, BUTTON_UP, BUTTON_NONE },
68 { ACTION_WPS_VOLUP, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
69 { ACTION_WPS_BROWSE, BUTTON_OK|BUTTON_REL, BUTTON_OK },
70 { ACTION_WPS_CONTEXT, BUTTON_MENU|BUTTON_REPEAT, BUTTON_MENU },
71 { ACTION_WPS_HOTKEY, BUTTON_REC|BUTTON_REL, BUTTON_REC },
72 { ACTION_WPS_VIEW_PLAYLIST, BUTTON_CANCEL, BUTTON_NONE },
73 { ACTION_WPS_MENU, BUTTON_MENU|BUTTON_REL, BUTTON_MENU },
74 { ACTION_WPS_QUICKSCREEN, BUTTON_OK|BUTTON_REPEAT, BUTTON_OK },
76 LAST_ITEM_IN_LIST
77 }; /* button_context_wps */
79 static const struct button_mapping button_context_tree[] = {
80 { ACTION_TREE_WPS, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY },
81 { ACTION_TREE_STOP, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_PLAY },
82 { ACTION_TREE_HOTKEY, BUTTON_REC|BUTTON_REL, BUTTON_REC },
84 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
85 }; /* button_context_tree */
87 static const struct button_mapping button_context_tree_scroll_lr[] = {
88 { ACTION_NONE, BUTTON_PREV, BUTTON_NONE },
89 { ACTION_STD_CANCEL, BUTTON_PREV|BUTTON_REL, BUTTON_PREV },
90 { ACTION_TREE_ROOT_INIT, BUTTON_PREV|BUTTON_REPEAT, BUTTON_PREV },
91 { ACTION_TREE_PGLEFT, BUTTON_PREV|BUTTON_REPEAT, BUTTON_NONE },
92 { ACTION_TREE_PGLEFT, BUTTON_PREV|BUTTON_REL, BUTTON_PREV|BUTTON_REPEAT },
93 { ACTION_NONE, BUTTON_NEXT, BUTTON_NONE },
94 { ACTION_STD_OK, BUTTON_NEXT|BUTTON_REL, BUTTON_NEXT },
95 { ACTION_TREE_PGRIGHT, BUTTON_NEXT|BUTTON_REPEAT, BUTTON_NONE },
96 { ACTION_TREE_PGRIGHT, BUTTON_NEXT|BUTTON_REL, BUTTON_NEXT|BUTTON_REPEAT },
98 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_TREE),
99 }; /* button_context_tree_scroll_lr */
101 static const struct button_mapping button_context_settings[] = {
102 { ACTION_SETTINGS_INC, BUTTON_UP, BUTTON_NONE },
103 { ACTION_SETTINGS_INCREPEAT, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
104 { ACTION_SETTINGS_DEC, BUTTON_DOWN, BUTTON_NONE },
105 { ACTION_SETTINGS_DECREPEAT, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
106 { ACTION_STD_PREV, BUTTON_PREV, BUTTON_NONE },
107 { ACTION_STD_PREVREPEAT, BUTTON_PREV|BUTTON_REPEAT, BUTTON_NONE },
108 { ACTION_STD_NEXT, BUTTON_NEXT, BUTTON_NONE },
109 { ACTION_STD_NEXTREPEAT, BUTTON_NEXT|BUTTON_REPEAT, BUTTON_NONE },
110 { ACTION_STD_OK, BUTTON_OK|BUTTON_REL, BUTTON_NONE },
111 { ACTION_STD_CANCEL, BUTTON_CANCEL|BUTTON_REL, BUTTON_CANCEL },
113 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
114 }; /* button_context_settings */
116 static const struct button_mapping button_context_yesno[] = {
117 { ACTION_YESNO_ACCEPT, BUTTON_OK, BUTTON_NONE },
118 LAST_ITEM_IN_LIST
119 }; /* button_context_yesno */
121 static const struct button_mapping button_context_bmark[] = {
122 { ACTION_BMS_DELETE, BUTTON_CANCEL|BUTTON_REPEAT, BUTTON_CANCEL },
123 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST),
124 }; /* button_context_bmark */
126 static const struct button_mapping button_context_quickscreen[] = {
127 { ACTION_QS_TOP, BUTTON_UP, BUTTON_NONE },
128 { ACTION_QS_TOP, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
129 { ACTION_QS_DOWN, BUTTON_DOWN, BUTTON_NONE },
130 { ACTION_QS_DOWN, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
131 { ACTION_QS_LEFT, BUTTON_PREV, BUTTON_NONE },
132 { ACTION_QS_LEFT, BUTTON_PREV|BUTTON_REPEAT, BUTTON_NONE },
133 { ACTION_QS_RIGHT, BUTTON_NEXT, BUTTON_NONE },
134 { ACTION_QS_RIGHT, BUTTON_NEXT|BUTTON_REPEAT, BUTTON_NONE },
135 { ACTION_STD_CANCEL, BUTTON_OK, BUTTON_NONE },
137 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
138 }; /* button_context_quickscreen */
140 static const struct button_mapping button_context_pitchscreen[] = {
141 { ACTION_PS_INC_SMALL, BUTTON_UP, BUTTON_NONE },
142 { ACTION_PS_INC_BIG, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
143 { ACTION_PS_DEC_SMALL, BUTTON_DOWN, BUTTON_NONE },
144 { ACTION_PS_DEC_BIG, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
145 { ACTION_PS_NUDGE_LEFT, BUTTON_PREV, BUTTON_NONE },
146 { ACTION_PS_NUDGE_LEFTOFF, BUTTON_PREV|BUTTON_REL, BUTTON_NONE },
147 { ACTION_PS_NUDGE_RIGHT, BUTTON_NEXT, BUTTON_NONE },
148 { ACTION_PS_NUDGE_RIGHTOFF, BUTTON_NEXT|BUTTON_REL, BUTTON_NONE },
149 { ACTION_PS_TOGGLE_MODE, BUTTON_PLAY, BUTTON_NONE },
150 { ACTION_PS_RESET, BUTTON_MENU, BUTTON_NONE },
151 { ACTION_PS_EXIT, BUTTON_OK, BUTTON_NONE },
152 { ACTION_PS_SLOWER, BUTTON_PREV|BUTTON_REPEAT, BUTTON_NONE },
153 { ACTION_PS_FASTER, BUTTON_NEXT|BUTTON_REPEAT, BUTTON_NONE },
155 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
156 }; /* button_context_pitchscreen */
158 static const struct button_mapping button_context_keyboard[] = {
159 { ACTION_KBD_LEFT, BUTTON_PREV, BUTTON_NONE },
160 { ACTION_KBD_LEFT, BUTTON_PREV|BUTTON_REPEAT, BUTTON_NONE },
161 { ACTION_KBD_RIGHT, BUTTON_NEXT, BUTTON_NONE },
162 { ACTION_KBD_RIGHT, BUTTON_NEXT|BUTTON_REPEAT, BUTTON_NONE },
163 { ACTION_KBD_SELECT, BUTTON_PLAY, BUTTON_NONE },
164 { ACTION_KBD_DONE, BUTTON_OK, BUTTON_NONE },
165 { ACTION_KBD_ABORT, BUTTON_CANCEL|BUTTON_REL, BUTTON_CANCEL },
166 { ACTION_KBD_UP, BUTTON_UP, BUTTON_NONE },
167 { ACTION_KBD_UP, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
168 { ACTION_KBD_DOWN, BUTTON_DOWN, BUTTON_NONE },
169 { ACTION_KBD_DOWN, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
170 { ACTION_KBD_BACKSPACE, BUTTON_MENU|BUTTON_REL, BUTTON_MENU },
171 { ACTION_KBD_MORSE_INPUT, BUTTON_MENU|BUTTON_REPEAT, BUTTON_MENU },
172 { ACTION_KBD_MORSE_SELECT, BUTTON_PLAY|BUTTON_REL, BUTTON_NONE },
174 LAST_ITEM_IN_LIST
175 }; /* button_context_keyboard */
177 #ifdef HAVE_RECORDING
178 const struct button_mapping button_context_recscreen[] = {
180 { ACTION_REC_NEWFILE, BUTTON_REC|BUTTON_REL, BUTTON_REC },
181 { ACTION_STD_MENU, BUTTON_MENU|BUTTON_REPEAT, BUTTON_MENU },
182 { ACTION_REC_PAUSE, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY },
183 { ACTION_STD_CANCEL, BUTTON_CANCEL, BUTTON_NONE },
184 { ACTION_STD_NEXT, BUTTON_DOWN, BUTTON_NONE },
185 { ACTION_STD_NEXT, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
186 { ACTION_STD_PREV, BUTTON_UP, BUTTON_NONE },
187 { ACTION_STD_PREV, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
188 { ACTION_SETTINGS_INC, BUTTON_NEXT, BUTTON_NONE },
189 { ACTION_SETTINGS_INCREPEAT, BUTTON_NEXT|BUTTON_REPEAT, BUTTON_NONE },
190 { ACTION_SETTINGS_DEC, BUTTON_PREV, BUTTON_NONE },
191 { ACTION_SETTINGS_DECREPEAT, BUTTON_PREV|BUTTON_REPEAT, BUTTON_NONE },
193 LAST_ITEM_IN_LIST
194 }; /* button_context_recscreen */
195 #endif
197 #ifdef USB_ENABLE_HID
198 static const struct button_mapping button_context_usb_hid[] = {
199 { ACTION_USB_HID_MODE_SWITCH_NEXT, BUTTON_OK|BUTTON_NEXT|BUTTON_REL, BUTTON_OK|BUTTON_NEXT },
200 { ACTION_USB_HID_MODE_SWITCH_NEXT, BUTTON_OK|BUTTON_NEXT|BUTTON_REPEAT, BUTTON_OK|BUTTON_NEXT },
201 { ACTION_USB_HID_MODE_SWITCH_PREV, BUTTON_OK|BUTTON_PREV|BUTTON_REL, BUTTON_OK|BUTTON_PREV },
202 { ACTION_USB_HID_MODE_SWITCH_PREV, BUTTON_OK|BUTTON_PREV|BUTTON_REPEAT, BUTTON_OK|BUTTON_PREV },
204 LAST_ITEM_IN_LIST
205 }; /* button_context_usb_hid */
207 static const struct button_mapping button_context_usb_hid_mode_multimedia[] = {
208 { ACTION_USB_HID_MULTIMEDIA_VOLUME_DOWN, BUTTON_DOWN, BUTTON_NONE },
209 { ACTION_USB_HID_MULTIMEDIA_VOLUME_DOWN, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
210 { ACTION_USB_HID_MULTIMEDIA_VOLUME_UP, BUTTON_UP, BUTTON_NONE },
211 { ACTION_USB_HID_MULTIMEDIA_VOLUME_UP, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
212 { ACTION_USB_HID_MULTIMEDIA_VOLUME_MUTE, BUTTON_MENU|BUTTON_REL, BUTTON_MENU },
213 { ACTION_USB_HID_MULTIMEDIA_PLAYBACK_PLAY_PAUSE, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY },
214 { ACTION_USB_HID_MULTIMEDIA_PLAYBACK_STOP, BUTTON_CANCEL|BUTTON_REL, BUTTON_CANCEL },
215 { ACTION_USB_HID_MULTIMEDIA_PLAYBACK_STOP, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_PLAY },
216 { ACTION_USB_HID_MULTIMEDIA_PLAYBACK_TRACK_PREV, BUTTON_PREV|BUTTON_REL, BUTTON_PREV },
217 { ACTION_USB_HID_MULTIMEDIA_PLAYBACK_TRACK_NEXT, BUTTON_NEXT|BUTTON_REL, BUTTON_NEXT },
219 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_USB_HID)
220 }; /* button_context_usb_hid_mode_multimedia */
222 static const struct button_mapping button_context_usb_hid_mode_presentation[] = {
223 { ACTION_USB_HID_PRESENTATION_SLIDESHOW_START, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY },
224 { ACTION_USB_HID_PRESENTATION_SLIDESHOW_LEAVE, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_PLAY },
225 { ACTION_USB_HID_PRESENTATION_SLIDE_PREV, BUTTON_PREV|BUTTON_REL, BUTTON_PREV },
226 { ACTION_USB_HID_PRESENTATION_SLIDE_NEXT, BUTTON_NEXT|BUTTON_REL, BUTTON_NEXT },
227 { ACTION_USB_HID_PRESENTATION_SLIDE_FIRST, BUTTON_PREV|BUTTON_REPEAT, BUTTON_PREV },
228 { ACTION_USB_HID_PRESENTATION_SLIDE_LAST, BUTTON_NEXT|BUTTON_REPEAT, BUTTON_NEXT },
229 { ACTION_USB_HID_PRESENTATION_SCREEN_BLACK, BUTTON_CANCEL|BUTTON_REL, BUTTON_CANCEL },
230 { ACTION_USB_HID_PRESENTATION_SCREEN_WHITE, BUTTON_MENU|BUTTON_REL, BUTTON_MENU },
231 { ACTION_USB_HID_PRESENTATION_LINK_PREV, BUTTON_UP, BUTTON_NONE },
232 { ACTION_USB_HID_PRESENTATION_LINK_PREV, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
233 { ACTION_USB_HID_PRESENTATION_LINK_NEXT, BUTTON_DOWN, BUTTON_NONE },
234 { ACTION_USB_HID_PRESENTATION_LINK_NEXT, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
235 { ACTION_USB_HID_PRESENTATION_MOUSE_CLICK, BUTTON_OK|BUTTON_REL, BUTTON_OK },
236 { ACTION_USB_HID_PRESENTATION_MOUSE_OVER, BUTTON_OK|BUTTON_REPEAT, BUTTON_OK },
238 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_USB_HID)
239 }; /* button_context_usb_hid_mode_presentation */
241 static const struct button_mapping button_context_usb_hid_mode_browser[] = {
242 { ACTION_USB_HID_BROWSER_SCROLL_UP, BUTTON_UP, BUTTON_NONE },
243 { ACTION_USB_HID_BROWSER_SCROLL_UP, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
244 { ACTION_USB_HID_BROWSER_SCROLL_DOWN, BUTTON_DOWN, BUTTON_NONE },
245 { ACTION_USB_HID_BROWSER_SCROLL_DOWN, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
246 { ACTION_USB_HID_BROWSER_SCROLL_PAGE_UP, BUTTON_OK|BUTTON_REL, BUTTON_OK },
247 { ACTION_USB_HID_BROWSER_SCROLL_PAGE_DOWN, BUTTON_CANCEL|BUTTON_REL, BUTTON_CANCEL },
248 { ACTION_USB_HID_BROWSER_ZOOM_IN, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY },
249 { ACTION_USB_HID_BROWSER_ZOOM_OUT, BUTTON_MENU|BUTTON_REL, BUTTON_MENU },
250 { ACTION_USB_HID_BROWSER_ZOOM_RESET, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_PLAY },
251 { ACTION_USB_HID_BROWSER_TAB_PREV, BUTTON_PREV|BUTTON_REL, BUTTON_PREV },
252 { ACTION_USB_HID_BROWSER_TAB_NEXT, BUTTON_NEXT|BUTTON_REL, BUTTON_NEXT },
253 { ACTION_USB_HID_BROWSER_TAB_CLOSE, BUTTON_CANCEL|BUTTON_REPEAT, BUTTON_CANCEL },
254 { ACTION_USB_HID_BROWSER_HISTORY_BACK, BUTTON_PREV|BUTTON_REPEAT, BUTTON_PREV },
255 { ACTION_USB_HID_BROWSER_HISTORY_FORWARD, BUTTON_NEXT|BUTTON_REPEAT, BUTTON_NEXT },
256 { ACTION_USB_HID_BROWSER_VIEW_FULL_SCREEN, BUTTON_REC|BUTTON_REL, BUTTON_REC },
258 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_USB_HID)
259 }; /* button_context_usb_hid_mode_browser */
261 #ifdef HAVE_USB_HID_MOUSE
262 static const struct button_mapping button_context_usb_hid_mode_mouse[] = {
263 { ACTION_USB_HID_MOUSE_UP, BUTTON_UP, BUTTON_NONE },
264 { ACTION_USB_HID_MOUSE_UP_REP, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
265 { ACTION_USB_HID_MOUSE_DOWN, BUTTON_DOWN, BUTTON_NONE },
266 { ACTION_USB_HID_MOUSE_DOWN_REP, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
267 { ACTION_USB_HID_MOUSE_LEFT, BUTTON_PREV, BUTTON_NONE },
268 { ACTION_USB_HID_MOUSE_LEFT_REP, BUTTON_PREV|BUTTON_REPEAT, BUTTON_NONE },
269 { ACTION_USB_HID_MOUSE_RIGHT, BUTTON_NEXT, BUTTON_NONE },
270 { ACTION_USB_HID_MOUSE_RIGHT_REP, BUTTON_NEXT|BUTTON_REPEAT, BUTTON_NONE },
271 { ACTION_USB_HID_MOUSE_BUTTON_LEFT, BUTTON_MENU, BUTTON_NONE },
272 { ACTION_USB_HID_MOUSE_BUTTON_LEFT_REL, BUTTON_MENU|BUTTON_REL, BUTTON_NONE },
273 { ACTION_USB_HID_MOUSE_BUTTON_RIGHT, BUTTON_PLAY, BUTTON_NONE },
274 { ACTION_USB_HID_MOUSE_BUTTON_RIGHT_REL, BUTTON_PLAY|BUTTON_REL, BUTTON_NONE },
275 { ACTION_USB_HID_MOUSE_WHEEL_SCROLL_UP, BUTTON_OK, BUTTON_NONE },
276 { ACTION_USB_HID_MOUSE_WHEEL_SCROLL_UP, BUTTON_OK|BUTTON_REPEAT, BUTTON_NONE },
277 { ACTION_USB_HID_MOUSE_WHEEL_SCROLL_DOWN, BUTTON_CANCEL, BUTTON_NONE },
278 { ACTION_USB_HID_MOUSE_WHEEL_SCROLL_DOWN, BUTTON_CANCEL|BUTTON_REPEAT, BUTTON_NONE },
280 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_USB_HID)
281 }; /* button_context_usb_hid_mode_mouse */
282 #endif
283 #endif
285 /* get_context_mapping returns a pointer to one of the above defined arrays depending on the context */
286 const struct button_mapping* get_context_mapping(int context)
288 switch (context)
290 case CONTEXT_STD:
291 return button_context_standard;
292 case CONTEXT_WPS:
293 return button_context_wps;
295 case CONTEXT_TREE:
296 case CONTEXT_MAINMENU:
297 if (global_settings.hold_lr_for_scroll_in_list)
298 return button_context_tree_scroll_lr;
299 /* else fall through to CUSTOM|CONTEXT_TREE */
300 case CONTEXT_CUSTOM|CONTEXT_TREE:
301 return button_context_tree;
303 case CONTEXT_LIST:
304 return button_context_standard;
306 case CONTEXT_SETTINGS_EQ:
307 case CONTEXT_SETTINGS_COLOURCHOOSER:
308 case CONTEXT_SETTINGS_TIME:
309 case CONTEXT_SETTINGS:
310 case CONTEXT_SETTINGS_RECTRIGGER:
311 return button_context_settings;
312 case CONTEXT_YESNOSCREEN:
313 return button_context_yesno;
314 case CONTEXT_BOOKMARKSCREEN:
315 return button_context_bmark;
316 case CONTEXT_QUICKSCREEN:
317 return button_context_quickscreen;
318 case CONTEXT_PITCHSCREEN:
319 return button_context_pitchscreen;
320 case CONTEXT_KEYBOARD:
321 case CONTEXT_MORSE_INPUT:
322 return button_context_keyboard;
323 #ifdef HAVE_RECORDING
324 case CONTEXT_RECSCREEN:
325 return button_context_recscreen;
326 #endif
327 #ifdef USB_ENABLE_HID
328 case CONTEXT_USB_HID:
329 return button_context_usb_hid;
330 case CONTEXT_USB_HID_MODE_MULTIMEDIA:
331 return button_context_usb_hid_mode_multimedia;
332 case CONTEXT_USB_HID_MODE_PRESENTATION:
333 return button_context_usb_hid_mode_presentation;
334 case CONTEXT_USB_HID_MODE_BROWSER:
335 return button_context_usb_hid_mode_browser;
336 #ifdef HAVE_USB_HID_MOUSE
337 case CONTEXT_USB_HID_MODE_MOUSE:
338 return button_context_usb_hid_mode_mouse;
339 #endif
340 #endif
341 default:
342 return button_context_standard;
344 return button_context_standard;