Use DBOP to check for left button on C200v2 like we are supposed to instead of right...
[kugel-rb.git] / apps / keymaps / keymap-gigabeat.c
blobb7d09eca7ca4209f894501a39304735ebe0db120
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2006 Jonathan Gordon
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
22 /* Button Code Definitions for the toshiba gigabeat target */
23 #include <stdio.h>
24 #include <string.h>
25 #include <stdlib.h>
27 #include "config.h"
28 #include "action.h"
29 #include "button.h"
30 #include "settings.h"
33 * The format of the list is as follows
34 * { Action Code, Button code, Prereq button code }
35 * if there's no need to check the previous button's value, use BUTTON_NONE
36 * Insert LAST_ITEM_IN_LIST at the end of each mapping
39 /* CONTEXT_CUSTOM's used in this file...
41 CONTEXT_CUSTOM|CONTEXT_TREE = the standard list/tree defines (without directions)
42 CONTEXT_CUSTOM|CONTEXT_SETTINGS = the direction keys for the eq/col picker screens
43 i.e where up/down is inc/dec
44 CONTEXT_SETTINGS = up/down is prev/next, l/r is inc/dec
49 static const struct button_mapping button_context_standard[] = {
50 { ACTION_STD_PREV, BUTTON_UP, BUTTON_NONE },
51 { ACTION_STD_PREVREPEAT, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
52 { ACTION_STD_NEXT, BUTTON_DOWN, BUTTON_NONE },
53 { ACTION_STD_NEXTREPEAT, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
55 { ACTION_STD_CANCEL, BUTTON_LEFT, BUTTON_NONE },
56 { ACTION_STD_CANCEL, BUTTON_POWER, BUTTON_NONE },
58 { ACTION_STD_CONTEXT, BUTTON_SELECT|BUTTON_REPEAT,BUTTON_SELECT },
60 { ACTION_STD_QUICKSCREEN, BUTTON_MENU|BUTTON_REPEAT, BUTTON_MENU },
61 { ACTION_STD_MENU, BUTTON_MENU|BUTTON_REL, BUTTON_MENU },
63 { ACTION_STD_OK, BUTTON_SELECT|BUTTON_REL, BUTTON_SELECT },
64 { ACTION_STD_OK, BUTTON_RIGHT, BUTTON_NONE },
66 LAST_ITEM_IN_LIST
67 }; /* button_context_standard */
70 static const struct button_mapping button_context_wps[] = {
71 { ACTION_WPS_PLAY, BUTTON_A|BUTTON_REL, BUTTON_A },
72 { ACTION_WPS_STOP, BUTTON_POWER|BUTTON_REL, BUTTON_POWER },
74 { ACTION_WPS_SKIPNEXT, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT },
75 { ACTION_WPS_SKIPPREV, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT },
77 { ACTION_WPS_SEEKBACK, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
78 { ACTION_WPS_SEEKFWD, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
79 { ACTION_WPS_STOPSEEK, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT|BUTTON_REPEAT },
80 { ACTION_WPS_STOPSEEK, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT|BUTTON_REPEAT },
82 { ACTION_WPS_ABSETB_NEXTDIR,BUTTON_A|BUTTON_RIGHT, BUTTON_NONE },
83 { ACTION_WPS_ABSETA_PREVDIR,BUTTON_A|BUTTON_LEFT, BUTTON_NONE },
84 { ACTION_WPS_ABRESET, BUTTON_A|BUTTON_SELECT, BUTTON_NONE },
86 { ACTION_WPS_VOLDOWN, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
87 { ACTION_WPS_VOLDOWN, BUTTON_DOWN, BUTTON_NONE },
88 { ACTION_WPS_VOLDOWN, BUTTON_VOL_DOWN, BUTTON_NONE },
89 { ACTION_WPS_VOLDOWN, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE },
90 { ACTION_WPS_VOLUP, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
91 { ACTION_WPS_VOLUP, BUTTON_UP, BUTTON_NONE },
92 { ACTION_WPS_VOLUP, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE },
93 { ACTION_WPS_VOLUP, BUTTON_VOL_UP, BUTTON_NONE },
95 { ACTION_WPS_PITCHSCREEN, BUTTON_A|BUTTON_UP, BUTTON_A },
96 { ACTION_WPS_VIEW_PLAYLIST, BUTTON_A|BUTTON_DOWN, BUTTON_NONE },
98 { ACTION_WPS_QUICKSCREEN, BUTTON_MENU|BUTTON_REPEAT, BUTTON_MENU },
99 { ACTION_WPS_MENU, BUTTON_MENU|BUTTON_REL, BUTTON_MENU },
100 { ACTION_WPS_CONTEXT, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_SELECT },
102 { ACTION_WPS_HOTKEY, BUTTON_A|BUTTON_MENU, BUTTON_NONE },
103 { ACTION_WPS_BROWSE, BUTTON_SELECT|BUTTON_REL, BUTTON_SELECT },
105 LAST_ITEM_IN_LIST
106 }; /* button_context_wps */
108 static const struct button_mapping button_context_list[] = {
109 { ACTION_LISTTREE_PGUP, BUTTON_A|BUTTON_UP, BUTTON_A },
110 { ACTION_LISTTREE_PGUP, BUTTON_UP|BUTTON_REL, BUTTON_A|BUTTON_UP },
111 { ACTION_LISTTREE_PGUP, BUTTON_A|BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
112 { ACTION_LISTTREE_PGDOWN, BUTTON_A|BUTTON_DOWN, BUTTON_A },
113 { ACTION_LISTTREE_PGDOWN, BUTTON_DOWN|BUTTON_REL, BUTTON_A|BUTTON_DOWN },
114 { ACTION_LISTTREE_PGDOWN, BUTTON_A|BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
115 #ifdef HAVE_VOLUME_IN_LIST
116 { ACTION_LIST_VOLUP, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE },
117 { ACTION_LIST_VOLUP, BUTTON_VOL_UP, BUTTON_NONE },
118 { ACTION_LIST_VOLDOWN, BUTTON_VOL_DOWN, BUTTON_NONE },
119 { ACTION_LIST_VOLDOWN, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE },
120 #endif
122 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
123 }; /* button_context_list */
125 static const struct button_mapping button_context_tree[] = {
126 { ACTION_TREE_WPS, BUTTON_A|BUTTON_REL, BUTTON_A },
127 { ACTION_TREE_STOP, BUTTON_POWER, BUTTON_NONE },
128 { ACTION_TREE_STOP, BUTTON_POWER|BUTTON_REL, BUTTON_POWER },
129 { ACTION_TREE_STOP, BUTTON_POWER|BUTTON_REPEAT, BUTTON_NONE },
130 { ACTION_TREE_HOTKEY, BUTTON_A|BUTTON_MENU, BUTTON_NONE },
132 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST)
133 }; /* button_context_tree */
135 static const struct button_mapping button_context_listtree_scroll_with_combo[] = {
136 { ACTION_NONE, BUTTON_A, BUTTON_NONE },
137 { ACTION_TREE_PGLEFT, BUTTON_A|BUTTON_LEFT, BUTTON_A },
138 { ACTION_TREE_PGLEFT, BUTTON_LEFT|BUTTON_REL, BUTTON_A|BUTTON_LEFT },
139 { ACTION_TREE_PGLEFT, BUTTON_A|BUTTON_LEFT, BUTTON_LEFT|BUTTON_REL },
140 { ACTION_TREE_ROOT_INIT, BUTTON_A|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_A|BUTTON_LEFT },
141 { ACTION_TREE_PGLEFT, BUTTON_A|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
142 { ACTION_TREE_PGRIGHT, BUTTON_A|BUTTON_RIGHT, BUTTON_A },
143 { ACTION_TREE_PGRIGHT, BUTTON_RIGHT|BUTTON_REL, BUTTON_A|BUTTON_RIGHT },
144 { ACTION_TREE_PGRIGHT, BUTTON_A|BUTTON_RIGHT, BUTTON_RIGHT|BUTTON_REL },
145 { ACTION_TREE_PGRIGHT, BUTTON_A|BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
146 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_TREE),
149 static const struct button_mapping button_context_listtree_scroll_without_combo[] = {
150 { ACTION_NONE, BUTTON_LEFT, BUTTON_NONE },
151 { ACTION_STD_CANCEL, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT },
152 { ACTION_TREE_ROOT_INIT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_LEFT },
153 { ACTION_TREE_PGLEFT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
154 { ACTION_TREE_PGLEFT, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT|BUTTON_REPEAT },
155 { ACTION_NONE, BUTTON_RIGHT, BUTTON_NONE },
156 { ACTION_STD_OK, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT },
157 { ACTION_TREE_PGRIGHT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
158 { ACTION_TREE_PGRIGHT, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT|BUTTON_REPEAT },
159 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_TREE),
162 static const struct button_mapping button_context_settings[] = {
163 { ACTION_SETTINGS_INC, BUTTON_UP, BUTTON_NONE },
164 { ACTION_SETTINGS_INCREPEAT, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
165 { ACTION_SETTINGS_DEC, BUTTON_DOWN, BUTTON_NONE },
166 { ACTION_SETTINGS_DECREPEAT, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
167 { ACTION_STD_PREV, BUTTON_LEFT, BUTTON_NONE },
168 { ACTION_STD_PREVREPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
169 { ACTION_STD_NEXT, BUTTON_RIGHT, BUTTON_NONE },
170 { ACTION_STD_NEXTREPEAT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
171 { ACTION_SETTINGS_RESET, BUTTON_A, BUTTON_NONE },
173 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
174 }; /* button_context_settings */
176 static const struct button_mapping button_context_settings_right_is_inc[] = {
177 { ACTION_SETTINGS_INC, BUTTON_RIGHT, BUTTON_NONE },
178 { ACTION_SETTINGS_INCREPEAT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
179 { ACTION_SETTINGS_DEC, BUTTON_LEFT, BUTTON_NONE },
180 { ACTION_SETTINGS_DECREPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
181 { ACTION_STD_PREV, BUTTON_UP, BUTTON_NONE },
182 { ACTION_STD_PREVREPEAT, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
183 { ACTION_STD_NEXT, BUTTON_DOWN, BUTTON_NONE },
184 { ACTION_STD_NEXTREPEAT, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
185 { ACTION_SETTINGS_RESET, BUTTON_A, BUTTON_NONE },
187 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
188 }; /* button_context_settingsgraphical */
190 static const struct button_mapping button_context_yesno[] = {
191 { ACTION_YESNO_ACCEPT, BUTTON_SELECT, BUTTON_NONE },
192 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
193 }; /* button_context_settings_yesno */
195 static const struct button_mapping button_context_colorchooser[] = {
196 { ACTION_STD_OK, BUTTON_A|BUTTON_REL, BUTTON_NONE },
197 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_SETTINGS),
198 }; /* button_context_colorchooser */
200 static const struct button_mapping button_context_eq[] = {
201 { ACTION_STD_OK, BUTTON_SELECT|BUTTON_REL, BUTTON_NONE },
202 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_SETTINGS),
203 }; /* button_context_eq */
205 /** Bookmark Screen **/
206 static const struct button_mapping button_context_bmark[] = {
207 { ACTION_BMS_DELETE, BUTTON_A, BUTTON_NONE },
209 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST),
210 }; /* button_context_bmark */
212 static const struct button_mapping button_context_time[] = {
213 { ACTION_STD_CANCEL, BUTTON_POWER, BUTTON_NONE },
214 { ACTION_STD_OK, BUTTON_A, BUTTON_NONE },
215 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS),
216 }; /* button_context_time */
218 static const struct button_mapping button_context_quickscreen[] = {
219 { ACTION_QS_TOP, BUTTON_UP, BUTTON_NONE },
220 { ACTION_QS_TOP, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
221 { ACTION_QS_DOWN, BUTTON_DOWN, BUTTON_NONE },
222 { ACTION_QS_DOWN, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
223 { ACTION_QS_LEFT, BUTTON_LEFT, BUTTON_NONE },
224 { ACTION_QS_LEFT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
225 { ACTION_QS_RIGHT, BUTTON_RIGHT, BUTTON_NONE },
226 { ACTION_QS_RIGHT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
227 { ACTION_STD_CANCEL, BUTTON_MENU, BUTTON_NONE },
229 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
230 }; /* button_context_quickscreen */
232 static const struct button_mapping button_context_pitchscreen[] = {
233 { ACTION_PS_INC_SMALL, BUTTON_UP, BUTTON_NONE },
234 { ACTION_PS_INC_BIG, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
235 { ACTION_PS_DEC_SMALL, BUTTON_DOWN, BUTTON_NONE },
236 { ACTION_PS_DEC_BIG, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
237 { ACTION_PS_NUDGE_LEFT, BUTTON_LEFT, BUTTON_NONE },
238 { ACTION_PS_NUDGE_LEFTOFF, BUTTON_LEFT|BUTTON_REL, BUTTON_NONE },
239 { ACTION_PS_NUDGE_RIGHT, BUTTON_RIGHT, BUTTON_NONE },
240 { ACTION_PS_NUDGE_RIGHTOFF, BUTTON_RIGHT|BUTTON_REL, BUTTON_NONE },
241 { ACTION_PS_TOGGLE_MODE, BUTTON_MENU, BUTTON_NONE },
242 { ACTION_PS_RESET, BUTTON_A, BUTTON_NONE },
243 { ACTION_PS_EXIT, BUTTON_POWER, BUTTON_NONE },
244 { ACTION_PS_SLOWER, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
245 { ACTION_PS_FASTER, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
247 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
248 }; /* button_context_pitchcreen */
250 static const struct button_mapping button_context_keyboard[] = {
251 { ACTION_KBD_LEFT, BUTTON_LEFT, BUTTON_NONE },
252 { ACTION_KBD_LEFT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
253 { ACTION_KBD_RIGHT, BUTTON_RIGHT, BUTTON_NONE },
254 { ACTION_KBD_RIGHT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
255 { ACTION_KBD_CURSOR_LEFT, BUTTON_A|BUTTON_LEFT, BUTTON_NONE },
256 { ACTION_KBD_CURSOR_LEFT, BUTTON_A|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
257 { ACTION_KBD_CURSOR_RIGHT, BUTTON_A|BUTTON_RIGHT, BUTTON_NONE },
258 { ACTION_KBD_CURSOR_RIGHT, BUTTON_A|BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
259 { ACTION_KBD_SELECT, BUTTON_SELECT, BUTTON_NONE },
260 { ACTION_KBD_PAGE_FLIP, BUTTON_A|BUTTON_MENU, BUTTON_NONE },
261 { ACTION_KBD_DONE, BUTTON_A|BUTTON_REL, BUTTON_A },
262 { ACTION_KBD_ABORT, BUTTON_POWER|BUTTON_REL, BUTTON_POWER },
263 { ACTION_KBD_BACKSPACE, BUTTON_MENU, BUTTON_NONE },
264 { ACTION_KBD_BACKSPACE, BUTTON_MENU|BUTTON_REPEAT, BUTTON_NONE },
265 { ACTION_KBD_UP, BUTTON_UP, BUTTON_NONE },
266 { ACTION_KBD_UP, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
267 { ACTION_KBD_DOWN, BUTTON_DOWN, BUTTON_NONE },
268 { ACTION_KBD_DOWN, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
269 { ACTION_KBD_MORSE_INPUT, BUTTON_A|BUTTON_POWER, BUTTON_NONE },
270 { ACTION_KBD_MORSE_SELECT, BUTTON_SELECT|BUTTON_REL, BUTTON_NONE },
272 LAST_ITEM_IN_LIST
273 }; /* button_context_keyboard */
275 /*****************************************************************************
276 * Remote control mappings
277 *****************************************************************************/
279 static const struct button_mapping remote_button_context_standard[] = {
280 { ACTION_STD_PREV, BUTTON_RC_VOL_UP, BUTTON_NONE },
281 { ACTION_STD_PREVREPEAT, BUTTON_RC_VOL_UP|BUTTON_REPEAT, BUTTON_NONE },
282 { ACTION_STD_NEXT, BUTTON_RC_VOL_DOWN, BUTTON_NONE },
283 { ACTION_STD_NEXTREPEAT, BUTTON_RC_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE },
284 { ACTION_STD_CANCEL, BUTTON_RC_REW, BUTTON_NONE },
285 { ACTION_STD_OK, BUTTON_RC_FF|BUTTON_REL, BUTTON_RC_FF },
286 { ACTION_STD_CONTEXT, BUTTON_RC_FF|BUTTON_REPEAT, BUTTON_RC_FF },
287 { ACTION_STD_MENU, BUTTON_RC_DSP, BUTTON_NONE },
289 LAST_ITEM_IN_LIST
292 static const struct button_mapping remote_button_context_wps[] = {
293 { ACTION_WPS_PLAY, BUTTON_RC_PLAY, BUTTON_NONE },
295 { ACTION_WPS_SKIPNEXT, BUTTON_RC_FF|BUTTON_REL, BUTTON_RC_FF },
296 { ACTION_WPS_SKIPPREV, BUTTON_RC_REW|BUTTON_REL, BUTTON_RC_REW },
298 { ACTION_WPS_SEEKBACK, BUTTON_RC_REW|BUTTON_REPEAT, BUTTON_NONE },
299 { ACTION_WPS_SEEKFWD, BUTTON_RC_FF|BUTTON_REPEAT, BUTTON_NONE },
300 { ACTION_WPS_STOPSEEK, BUTTON_RC_REW|BUTTON_REL, BUTTON_RC_REW|BUTTON_REPEAT },
301 { ACTION_WPS_STOPSEEK, BUTTON_RC_FF|BUTTON_REL, BUTTON_RC_FF|BUTTON_REPEAT },
303 { ACTION_WPS_STOP, BUTTON_RC_PLAY|BUTTON_REPEAT, BUTTON_RC_PLAY },
304 { ACTION_WPS_MENU, BUTTON_RC_DSP, BUTTON_NONE },
306 { ACTION_WPS_VOLDOWN, BUTTON_RC_VOL_DOWN, BUTTON_NONE },
307 { ACTION_WPS_VOLDOWN, BUTTON_RC_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE },
308 { ACTION_WPS_VOLUP, BUTTON_RC_VOL_UP|BUTTON_REPEAT, BUTTON_NONE },
309 { ACTION_WPS_VOLUP, BUTTON_RC_VOL_UP, BUTTON_NONE },
311 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
314 static const struct button_mapping remote_button_context_tree[] = {
315 { ACTION_TREE_WPS, BUTTON_RC_PLAY|BUTTON_REL, BUTTON_RC_PLAY },
316 { ACTION_TREE_STOP, BUTTON_RC_PLAY|BUTTON_REPEAT, BUTTON_RC_PLAY },
317 { ACTION_STD_CANCEL, BUTTON_RC_REW|BUTTON_REPEAT, BUTTON_NONE },
319 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
322 static const struct button_mapping* get_context_mapping_remote( int context )
324 context ^= CONTEXT_REMOTE;
326 switch (context)
328 case CONTEXT_WPS:
329 return remote_button_context_wps;
330 case CONTEXT_MAINMENU:
331 case CONTEXT_TREE:
332 return remote_button_context_tree;
334 return remote_button_context_standard;
337 const struct button_mapping* get_context_mapping(int context)
339 if (context&CONTEXT_REMOTE)
340 return get_context_mapping_remote(context);
342 switch (context)
344 case CONTEXT_STD:
345 return button_context_standard;
346 case CONTEXT_WPS:
347 return button_context_wps;
349 case CONTEXT_LIST:
350 return button_context_list;
351 case CONTEXT_MAINMENU:
352 case CONTEXT_TREE:
353 if (global_settings.hold_lr_for_scroll_in_list)
354 return button_context_listtree_scroll_without_combo;
355 else
356 return button_context_listtree_scroll_with_combo;
357 case CONTEXT_CUSTOM|CONTEXT_TREE:
358 return button_context_tree;
360 case CONTEXT_SETTINGS:
361 return button_context_settings;
362 case CONTEXT_CUSTOM|CONTEXT_SETTINGS:
363 return button_context_settings_right_is_inc;
365 case CONTEXT_SETTINGS_COLOURCHOOSER:
366 return button_context_colorchooser;
367 case CONTEXT_SETTINGS_EQ:
368 return button_context_eq;
370 case CONTEXT_SETTINGS_TIME:
371 return button_context_time;
373 case CONTEXT_YESNOSCREEN:
374 return button_context_yesno;
375 case CONTEXT_BOOKMARKSCREEN:
376 return button_context_bmark;
377 case CONTEXT_QUICKSCREEN:
378 return button_context_quickscreen;
379 case CONTEXT_PITCHSCREEN:
380 return button_context_pitchscreen;
381 case CONTEXT_KEYBOARD:
382 case CONTEXT_MORSE_INPUT:
383 return button_context_keyboard;
385 return button_context_standard;