Use r12 to save 1 register.
[kugel-rb.git] / apps / keymaps / keymap-h1x0_h3x0.c
blob31e38533f3becd8da460425de304b05e207cb552
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 iriver h100/h300 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 "lcd-remote.h" /* for remote_type() */
31 #include "settings.h"
33 /*
34 * The format of the list is as follows
35 * { Action Code, Button code, Prereq button code }
36 * if there's no need to check the previous button's value, use BUTTON_NONE
37 * Insert LAST_ITEM_IN_LIST at the end of each mapping
40 /* CONTEXT_CUSTOM's used in this file...
42 CONTEXT_CUSTOM|CONTEXT_TREE = the standard list/tree defines (without directions)
43 CONTEXT_CUSTOM|CONTEXT_SETTINGS = the direction keys for the eq/col picker screens
44 i.e where up/down is inc/dec
45 CONTEXT_SETTINGS = up/down is prev/next, l/r is inc/dec
50 static const struct button_mapping button_context_standard[] = {
51 { ACTION_STD_PREV, BUTTON_UP, BUTTON_NONE },
52 { ACTION_STD_PREVREPEAT, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
53 { ACTION_STD_NEXT, BUTTON_DOWN, BUTTON_NONE },
54 { ACTION_STD_NEXTREPEAT, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
56 { ACTION_STD_CANCEL, BUTTON_LEFT, BUTTON_NONE },
57 { ACTION_STD_CANCEL, BUTTON_OFF, BUTTON_NONE },
59 { ACTION_STD_CONTEXT, BUTTON_SELECT|BUTTON_REPEAT,BUTTON_SELECT },
61 { ACTION_STD_QUICKSCREEN, BUTTON_MODE|BUTTON_REPEAT, BUTTON_MODE },
62 { ACTION_STD_MENU, BUTTON_MODE|BUTTON_REL, BUTTON_MODE },
63 { ACTION_STD_OK, BUTTON_SELECT|BUTTON_REL, BUTTON_SELECT },
64 { ACTION_STD_OK, BUTTON_RIGHT, BUTTON_NONE },
65 { ACTION_STD_OK, BUTTON_ON|BUTTON_REL, BUTTON_NONE },
66 { ACTION_STD_REC, BUTTON_REC|BUTTON_REPEAT, BUTTON_NONE },
68 LAST_ITEM_IN_LIST
69 }; /* button_context_standard */
71 static const struct button_mapping button_context_wps[] = {
72 { ACTION_WPS_PLAY, BUTTON_ON|BUTTON_REL, BUTTON_ON },
73 { ACTION_WPS_SKIPNEXT, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT },
74 { ACTION_WPS_SKIPPREV, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT },
75 { ACTION_WPS_SEEKBACK, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
76 { ACTION_WPS_SEEKFWD, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
77 { ACTION_WPS_STOPSEEK, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT|BUTTON_REPEAT },
78 { ACTION_WPS_STOPSEEK, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT|BUTTON_REPEAT },
79 { ACTION_WPS_ABSETB_NEXTDIR, BUTTON_ON|BUTTON_RIGHT, BUTTON_NONE },
80 { ACTION_WPS_ABSETA_PREVDIR, BUTTON_ON|BUTTON_LEFT, BUTTON_NONE },
81 { ACTION_WPS_STOP, BUTTON_OFF|BUTTON_REL, BUTTON_OFF },
82 { ACTION_WPS_VOLDOWN, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
83 { ACTION_WPS_VOLDOWN, BUTTON_DOWN, BUTTON_NONE },
84 { ACTION_WPS_VOLUP, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
85 { ACTION_WPS_VOLUP, BUTTON_UP, BUTTON_NONE },
86 { ACTION_WPS_PITCHSCREEN, BUTTON_ON|BUTTON_UP, BUTTON_ON },
87 { ACTION_WPS_PITCHSCREEN, BUTTON_ON|BUTTON_DOWN, BUTTON_ON },
88 { ACTION_WPS_QUICKSCREEN, BUTTON_MODE|BUTTON_REPEAT, BUTTON_MODE },
89 { ACTION_WPS_MENU, BUTTON_MODE|BUTTON_REL, BUTTON_MODE },
90 { ACTION_WPS_CONTEXT, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_SELECT },
91 { ACTION_WPS_BROWSE, BUTTON_SELECT|BUTTON_REL, BUTTON_SELECT },
92 { ACTION_WPS_ABRESET, BUTTON_ON|BUTTON_SELECT, BUTTON_ON },
93 { ACTION_WPS_ID3SCREEN, BUTTON_ON|BUTTON_MODE, BUTTON_NONE },
94 { ACTION_WPS_REC, BUTTON_REC|BUTTON_REPEAT, BUTTON_NONE },
95 { ACTION_WPS_HOTKEY, BUTTON_REC|BUTTON_REL, BUTTON_REC },
97 LAST_ITEM_IN_LIST
98 }; /* button_context_wps */
100 static const struct button_mapping button_context_list[] = {
101 { ACTION_LISTTREE_PGUP, BUTTON_ON|BUTTON_UP, BUTTON_ON },
102 { ACTION_LISTTREE_PGUP, BUTTON_UP|BUTTON_REL, BUTTON_ON|BUTTON_UP },
103 { ACTION_LISTTREE_PGUP, BUTTON_ON|BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
104 { ACTION_LISTTREE_PGDOWN, BUTTON_ON|BUTTON_DOWN, BUTTON_ON },
105 { ACTION_LISTTREE_PGDOWN, BUTTON_DOWN|BUTTON_REL, BUTTON_ON|BUTTON_DOWN },
106 { ACTION_LISTTREE_PGDOWN, BUTTON_ON|BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
107 { ACTION_NONE, BUTTON_ON|BUTTON_REL, BUTTON_NONE },
108 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
109 }; /* button_context_list */
111 static const struct button_mapping button_context_tree[] = {
112 { ACTION_TREE_WPS, BUTTON_ON|BUTTON_REL, BUTTON_ON },
113 { ACTION_TREE_STOP, BUTTON_OFF, BUTTON_NONE },
114 { ACTION_TREE_STOP, BUTTON_OFF|BUTTON_REPEAT, BUTTON_NONE },
115 { ACTION_TREE_HOTKEY, BUTTON_REC|BUTTON_REL, BUTTON_REC },
117 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST)
118 }; /* button_context_tree */
120 static const struct button_mapping button_context_listtree_scroll_with_combo[] = {
121 { ACTION_NONE, BUTTON_ON, BUTTON_NONE },
122 { ACTION_TREE_PGLEFT, BUTTON_ON|BUTTON_LEFT, BUTTON_ON },
123 { ACTION_TREE_PGLEFT, BUTTON_LEFT|BUTTON_REL, BUTTON_ON|BUTTON_LEFT },
124 { ACTION_TREE_PGLEFT, BUTTON_ON|BUTTON_LEFT, BUTTON_LEFT|BUTTON_REL },
125 { ACTION_TREE_ROOT_INIT, BUTTON_ON|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_ON|BUTTON_LEFT },
126 { ACTION_TREE_PGLEFT, BUTTON_ON|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
127 { ACTION_TREE_PGRIGHT, BUTTON_ON|BUTTON_RIGHT, BUTTON_ON },
128 { ACTION_TREE_PGRIGHT, BUTTON_RIGHT|BUTTON_REL, BUTTON_ON|BUTTON_RIGHT },
129 { ACTION_TREE_PGRIGHT, BUTTON_ON|BUTTON_RIGHT, BUTTON_RIGHT|BUTTON_REL },
130 { ACTION_TREE_PGRIGHT, BUTTON_ON|BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
131 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_TREE),
134 static const struct button_mapping button_context_listtree_scroll_without_combo[] = {
135 { ACTION_NONE, BUTTON_LEFT, BUTTON_NONE },
136 { ACTION_STD_CANCEL, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT },
137 { ACTION_TREE_ROOT_INIT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_LEFT },
138 { ACTION_TREE_PGLEFT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
139 { ACTION_TREE_PGLEFT, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT|BUTTON_REPEAT },
140 { ACTION_NONE, BUTTON_RIGHT, BUTTON_NONE },
141 { ACTION_STD_OK, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT },
142 { ACTION_TREE_PGRIGHT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
143 { ACTION_TREE_PGRIGHT, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT|BUTTON_REPEAT },
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_ON, 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_ON, 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 },
177 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
178 }; /* button_context_settings_yesno */
180 static const struct button_mapping button_context_colorchooser[] = {
181 { ACTION_STD_OK, BUTTON_ON|BUTTON_REL, BUTTON_NONE },
182 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_SETTINGS),
183 }; /* button_context_settings_colorchooser */
185 static const struct button_mapping button_context_eq[] = {
186 { ACTION_STD_OK, BUTTON_SELECT|BUTTON_REL, BUTTON_NONE },
187 { ACTION_NONE, BUTTON_ON|BUTTON_REL, BUTTON_NONE },
188 { ACTION_SETTINGS_INCBIGSTEP, BUTTON_ON|BUTTON_RIGHT, BUTTON_ON },
189 { ACTION_SETTINGS_INCBIGSTEP, BUTTON_RIGHT|BUTTON_REL, BUTTON_ON|BUTTON_RIGHT },
190 { ACTION_SETTINGS_INCBIGSTEP, BUTTON_ON|BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
191 { ACTION_SETTINGS_DECBIGSTEP, BUTTON_ON|BUTTON_LEFT, BUTTON_ON },
192 { ACTION_SETTINGS_DECBIGSTEP, BUTTON_LEFT|BUTTON_REL, BUTTON_ON|BUTTON_LEFT },
193 { ACTION_SETTINGS_DECBIGSTEP, BUTTON_ON|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
194 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_SETTINGS),
195 }; /* button_context_settings_context_eq */
197 static const struct button_mapping button_context_bmark[] = {
198 { ACTION_BMS_DELETE, BUTTON_REC, BUTTON_NONE },
199 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST),
200 }; /* button_context_settings_bmark */
202 static const struct button_mapping button_context_time[] = {
203 { ACTION_STD_CANCEL, BUTTON_OFF, BUTTON_NONE },
204 { ACTION_STD_OK, BUTTON_ON, BUTTON_NONE },
205 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS),
206 }; /* button_context_settings_bmark */
208 static const struct button_mapping button_context_quickscreen[] = {
209 { ACTION_QS_TOP, BUTTON_UP, BUTTON_NONE },
210 { ACTION_QS_TOP, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
211 { ACTION_QS_DOWN, BUTTON_DOWN, BUTTON_NONE },
212 { ACTION_QS_DOWN, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
213 { ACTION_QS_LEFT, BUTTON_LEFT, BUTTON_NONE },
214 { ACTION_QS_LEFT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
215 { ACTION_QS_RIGHT, BUTTON_RIGHT, BUTTON_NONE },
216 { ACTION_QS_RIGHT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
217 { ACTION_STD_CANCEL, BUTTON_MODE, BUTTON_NONE },
219 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
220 }; /* button_context_quickscreen */
222 static const struct button_mapping button_context_pitchscreen[] = {
223 { ACTION_PS_INC_SMALL, BUTTON_UP, BUTTON_NONE },
224 { ACTION_PS_INC_BIG, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
225 { ACTION_PS_DEC_SMALL, BUTTON_DOWN, BUTTON_NONE },
226 { ACTION_PS_DEC_BIG, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
227 { ACTION_PS_NUDGE_LEFT, BUTTON_LEFT, BUTTON_NONE },
228 { ACTION_PS_NUDGE_LEFTOFF, BUTTON_LEFT|BUTTON_REL, BUTTON_NONE },
229 { ACTION_PS_NUDGE_RIGHT, BUTTON_RIGHT, BUTTON_NONE },
230 { ACTION_PS_NUDGE_RIGHTOFF, BUTTON_RIGHT|BUTTON_REL, BUTTON_NONE },
231 { ACTION_PS_TOGGLE_MODE, BUTTON_MODE, BUTTON_NONE },
232 { ACTION_PS_RESET, BUTTON_SELECT, BUTTON_NONE },
233 { ACTION_PS_EXIT, BUTTON_ON, BUTTON_NONE },
234 { ACTION_PS_EXIT, BUTTON_OFF, BUTTON_NONE },
235 { ACTION_PS_SLOWER, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
236 { ACTION_PS_FASTER, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
238 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
239 }; /* button_context_pitchcreen */
241 static const struct button_mapping button_context_recscreen[] = {
242 { ACTION_REC_PAUSE, BUTTON_ON, BUTTON_NONE },
243 { ACTION_REC_NEWFILE, BUTTON_REC, BUTTON_NONE },
244 { ACTION_SETTINGS_INC, BUTTON_RIGHT, BUTTON_NONE },
245 { ACTION_SETTINGS_INCREPEAT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
246 { ACTION_SETTINGS_DEC, BUTTON_LEFT, BUTTON_NONE },
247 { ACTION_SETTINGS_DECREPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
249 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
250 }; /* button_context_recscreen */
252 static const struct button_mapping button_context_keyboard[] = {
253 { ACTION_KBD_LEFT, BUTTON_LEFT, BUTTON_NONE },
254 { ACTION_KBD_LEFT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
255 { ACTION_KBD_RIGHT, BUTTON_RIGHT, BUTTON_NONE },
256 { ACTION_KBD_RIGHT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
257 { ACTION_KBD_CURSOR_LEFT, BUTTON_ON|BUTTON_LEFT, BUTTON_NONE },
258 { ACTION_KBD_CURSOR_LEFT, BUTTON_ON|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
259 { ACTION_KBD_CURSOR_RIGHT, BUTTON_ON|BUTTON_RIGHT, BUTTON_NONE },
260 { ACTION_KBD_CURSOR_RIGHT, BUTTON_ON|BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
261 { ACTION_KBD_SELECT, BUTTON_SELECT, BUTTON_NONE },
262 { ACTION_KBD_PAGE_FLIP, BUTTON_MODE, BUTTON_NONE },
263 { ACTION_KBD_DONE, BUTTON_ON|BUTTON_REL, BUTTON_ON },
264 { ACTION_KBD_ABORT, BUTTON_OFF, BUTTON_NONE },
265 { ACTION_KBD_BACKSPACE, BUTTON_REC, BUTTON_NONE },
266 { ACTION_KBD_BACKSPACE, BUTTON_REC|BUTTON_REPEAT, BUTTON_NONE },
267 { ACTION_KBD_UP, BUTTON_UP, BUTTON_NONE },
268 { ACTION_KBD_UP, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
269 { ACTION_KBD_DOWN, BUTTON_DOWN, BUTTON_NONE },
270 { ACTION_KBD_DOWN, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
271 { ACTION_KBD_MORSE_INPUT, BUTTON_ON|BUTTON_MODE, BUTTON_NONE },
272 { ACTION_KBD_MORSE_SELECT, BUTTON_SELECT|BUTTON_REL, BUTTON_NONE },
274 LAST_ITEM_IN_LIST
275 }; /* button_context_keyboard */
277 static const struct button_mapping button_context_radio[] = {
278 { ACTION_FM_MENU, BUTTON_SELECT | BUTTON_REPEAT, BUTTON_NONE },
279 { ACTION_FM_PRESET, BUTTON_SELECT | BUTTON_REL, BUTTON_SELECT },
280 { ACTION_FM_STOP, BUTTON_OFF, BUTTON_NONE },
281 { ACTION_FM_MODE, BUTTON_ON | BUTTON_REPEAT, BUTTON_ON },
282 { ACTION_FM_EXIT, BUTTON_MODE | BUTTON_REL, BUTTON_MODE },
283 { ACTION_FM_PLAY, BUTTON_ON | BUTTON_REL, BUTTON_ON },
284 { ACTION_FM_QUICKSCREEN, BUTTON_MODE|BUTTON_REPEAT, BUTTON_MODE },
286 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS)
290 /*****************************************************************************
291 * Remote control mappings
292 *****************************************************************************/
295 static const struct button_mapping button_context_standard_h100remote[] = {
296 { ACTION_STD_PREV, BUTTON_RC_REW, BUTTON_NONE },
297 { ACTION_STD_PREVREPEAT, BUTTON_RC_REW|BUTTON_REPEAT, BUTTON_NONE },
298 { ACTION_STD_NEXT, BUTTON_RC_FF, BUTTON_NONE },
299 { ACTION_STD_NEXTREPEAT, BUTTON_RC_FF|BUTTON_REPEAT, BUTTON_NONE },
301 { ACTION_STD_CANCEL, BUTTON_RC_STOP, BUTTON_NONE },
302 { ACTION_STD_CONTEXT, BUTTON_RC_MENU|BUTTON_REPEAT, BUTTON_RC_MENU },
304 { ACTION_STD_QUICKSCREEN, BUTTON_RC_MODE|BUTTON_REPEAT, BUTTON_RC_MODE },
305 { ACTION_STD_MENU, BUTTON_RC_MODE|BUTTON_REL, BUTTON_RC_MODE },
306 { ACTION_STD_OK, BUTTON_RC_ON, BUTTON_NONE },
307 { ACTION_STD_OK, BUTTON_RC_MENU|BUTTON_REL, BUTTON_RC_MENU },
309 LAST_ITEM_IN_LIST
310 }; /* button_context_standard_h100lcdremote */
312 static const struct button_mapping button_context_standard_h300lcdremote[] = {
313 { ACTION_STD_PREV, BUTTON_RC_VOL_UP, BUTTON_NONE },
314 { ACTION_STD_PREVREPEAT, BUTTON_RC_VOL_UP|BUTTON_REPEAT, BUTTON_NONE },
315 { ACTION_STD_NEXT, BUTTON_RC_VOL_DOWN, BUTTON_NONE },
316 { ACTION_STD_NEXTREPEAT, BUTTON_RC_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE },
318 { ACTION_STD_CANCEL, BUTTON_RC_REW, BUTTON_NONE },
319 { ACTION_STD_CANCEL, BUTTON_RC_STOP, BUTTON_NONE },
320 { ACTION_STD_CONTEXT, BUTTON_RC_MENU|BUTTON_REPEAT, BUTTON_RC_MENU },
321 { ACTION_STD_QUICKSCREEN, BUTTON_RC_MODE|BUTTON_REPEAT, BUTTON_RC_MODE },
322 { ACTION_STD_MENU, BUTTON_RC_MODE|BUTTON_REL, BUTTON_RC_MODE },
323 { ACTION_STD_OK, BUTTON_RC_MENU|BUTTON_REL, BUTTON_RC_MENU },
324 { ACTION_STD_OK, BUTTON_RC_FF, BUTTON_NONE },
326 LAST_ITEM_IN_LIST
330 static const struct button_mapping button_context_wps_remotescommon[] = {
331 { ACTION_WPS_PLAY, BUTTON_RC_ON|BUTTON_REL, BUTTON_RC_ON },
332 { ACTION_WPS_SKIPNEXT, BUTTON_RC_FF|BUTTON_REL, BUTTON_RC_FF },
333 { ACTION_WPS_SKIPPREV, BUTTON_RC_REW|BUTTON_REL, BUTTON_RC_REW },
334 { ACTION_WPS_SEEKBACK, BUTTON_RC_REW|BUTTON_REPEAT, BUTTON_NONE },
335 { ACTION_WPS_SEEKFWD, BUTTON_RC_FF|BUTTON_REPEAT, BUTTON_NONE },
336 { ACTION_WPS_STOPSEEK, BUTTON_RC_REW|BUTTON_REL, BUTTON_RC_REW|BUTTON_REPEAT },
337 { ACTION_WPS_STOPSEEK, BUTTON_RC_FF|BUTTON_REL, BUTTON_RC_FF|BUTTON_REPEAT },
338 { ACTION_WPS_ABSETB_NEXTDIR, BUTTON_RC_BITRATE, BUTTON_NONE },
339 { ACTION_WPS_ABSETA_PREVDIR, BUTTON_RC_SOURCE, BUTTON_NONE },
340 { ACTION_WPS_STOP, BUTTON_RC_STOP|BUTTON_REL, BUTTON_RC_STOP },
341 { ACTION_WPS_VOLDOWN, BUTTON_RC_VOL_DOWN, BUTTON_NONE },
342 { ACTION_WPS_VOLDOWN, BUTTON_RC_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE },
343 { ACTION_WPS_VOLUP, BUTTON_RC_VOL_UP, BUTTON_NONE },
344 { ACTION_WPS_VOLUP, BUTTON_RC_VOL_UP|BUTTON_REPEAT, BUTTON_NONE },
345 { ACTION_WPS_PITCHSCREEN, BUTTON_RC_ON|BUTTON_REPEAT, BUTTON_NONE },
346 { ACTION_WPS_QUICKSCREEN, BUTTON_RC_MODE|BUTTON_REPEAT, BUTTON_RC_MODE },
347 { ACTION_WPS_MENU, BUTTON_RC_MODE|BUTTON_REL, BUTTON_RC_MODE },
348 { ACTION_WPS_CONTEXT, BUTTON_RC_MENU|BUTTON_REPEAT, BUTTON_NONE },
349 { ACTION_WPS_BROWSE, BUTTON_RC_MENU|BUTTON_REL, BUTTON_RC_MENU },
350 /* Now the specific combos, because H100 & H300 LCD remotes have different
351 * keys, capable of acting as "modifier" - H100 : RC_ON; H300: RC_MENU
353 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_REMOTE|CONTEXT_WPS)
357 static const struct button_mapping button_context_wps_h100remote[] = {
358 { ACTION_WPS_ABRESET, BUTTON_RC_ON|BUTTON_RC_MENU, BUTTON_RC_ON },
359 { ACTION_WPS_ID3SCREEN, BUTTON_RC_ON|BUTTON_RC_MODE, BUTTON_NONE },
360 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
362 static const struct button_mapping button_context_wps_h300lcdremote[] = {
363 { ACTION_WPS_ABRESET, BUTTON_RC_MENU|BUTTON_RC_ON, BUTTON_RC_MENU },
364 { ACTION_WPS_ID3SCREEN, BUTTON_RC_MENU|BUTTON_RC_MODE, BUTTON_NONE },
365 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
368 static const struct button_mapping button_context_list_h100remote[] = {
369 { ACTION_LISTTREE_PGUP, BUTTON_RC_SOURCE, BUTTON_NONE },
370 { ACTION_LISTTREE_PGUP, BUTTON_RC_SOURCE|BUTTON_REPEAT, BUTTON_NONE },
371 { ACTION_LISTTREE_PGDOWN, BUTTON_RC_BITRATE, BUTTON_NONE },
372 { ACTION_LISTTREE_PGDOWN, BUTTON_RC_BITRATE|BUTTON_REPEAT, BUTTON_NONE },
373 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
376 static const struct button_mapping *button_context_list_h300lcdremote =
377 button_context_list_h100remote;
380 static const struct button_mapping button_context_tree_h100remote[] = {
381 { ACTION_TREE_WPS, BUTTON_RC_ON, BUTTON_NONE },
383 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST|CONTEXT_REMOTE)
384 }; /* button_context_tree_h100remote */
386 static const struct button_mapping button_context_tree_h300lcdremote[] = {
387 { ACTION_TREE_STOP, BUTTON_RC_STOP, BUTTON_NONE },
388 { ACTION_TREE_WPS, BUTTON_RC_ON, BUTTON_NONE },
389 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST|CONTEXT_REMOTE)
390 }; /* button_context_tree_h300lcdremote */
393 static const struct button_mapping button_context_listtree_scroll_w_cmb_h100remote[] = {
394 { ACTION_TREE_PGLEFT, BUTTON_RC_ON|BUTTON_RC_REW, BUTTON_RC_ON },
395 { ACTION_TREE_PGLEFT, BUTTON_RC_REW|BUTTON_REL, BUTTON_RC_ON|BUTTON_RC_REW },
396 { ACTION_TREE_PGLEFT, BUTTON_RC_ON|BUTTON_RC_REW, BUTTON_RC_REW|BUTTON_REL },
397 { ACTION_TREE_PGLEFT, BUTTON_RC_ON|BUTTON_RC_REW|BUTTON_REPEAT, BUTTON_NONE },
398 { ACTION_TREE_PGLEFT, BUTTON_RC_VOL_DOWN, BUTTON_NONE },
399 { ACTION_TREE_PGLEFT, BUTTON_RC_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE },
400 { ACTION_TREE_PGRIGHT, BUTTON_RC_ON|BUTTON_RC_FF, BUTTON_RC_ON },
401 { ACTION_TREE_PGRIGHT, BUTTON_RC_FF|BUTTON_REL, BUTTON_RC_ON|BUTTON_RC_FF },
402 { ACTION_TREE_PGRIGHT, BUTTON_RC_ON|BUTTON_RC_FF, BUTTON_RC_FF|BUTTON_REL },
403 { ACTION_TREE_PGRIGHT, BUTTON_RC_ON|BUTTON_RC_FF|BUTTON_REPEAT, BUTTON_NONE },
404 { ACTION_TREE_PGRIGHT, BUTTON_RC_VOL_UP, BUTTON_NONE },
405 { ACTION_TREE_PGRIGHT, BUTTON_RC_VOL_UP|BUTTON_REPEAT, BUTTON_NONE },
406 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_TREE|CONTEXT_REMOTE),
409 static const struct button_mapping button_context_listtree_scroll_w_cmb_h300lcdremote[] = {
410 { ACTION_TREE_PGLEFT, BUTTON_RC_MENU|BUTTON_RC_SOURCE, BUTTON_RC_MENU },
411 { ACTION_TREE_PGLEFT, BUTTON_RC_SOURCE|BUTTON_REL, BUTTON_RC_MENU|BUTTON_RC_SOURCE },
412 { ACTION_TREE_PGLEFT, BUTTON_RC_MENU|BUTTON_RC_SOURCE, BUTTON_RC_SOURCE|BUTTON_REL },
413 { ACTION_TREE_ROOT_INIT, BUTTON_RC_MENU|BUTTON_RC_SOURCE|BUTTON_REPEAT, BUTTON_RC_MENU|BUTTON_RC_SOURCE },
414 { ACTION_TREE_PGLEFT, BUTTON_RC_MENU|BUTTON_RC_SOURCE|BUTTON_REPEAT, BUTTON_NONE },
415 { ACTION_TREE_PGRIGHT, BUTTON_RC_MENU|BUTTON_RC_BITRATE, BUTTON_RC_MENU },
416 { ACTION_TREE_PGRIGHT, BUTTON_RC_BITRATE|BUTTON_REL, BUTTON_RC_MENU|BUTTON_RC_BITRATE },
417 { ACTION_TREE_PGRIGHT, BUTTON_RC_MENU|BUTTON_RC_BITRATE, BUTTON_RC_BITRATE|BUTTON_REL },
418 { ACTION_TREE_PGRIGHT, BUTTON_RC_MENU|BUTTON_RC_BITRATE|BUTTON_REPEAT, BUTTON_NONE },
419 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_TREE|CONTEXT_REMOTE),
422 static const struct button_mapping button_context_listtree_scroll_wo_cmb_h100remote[] = {
423 { ACTION_TREE_PGLEFT, BUTTON_RC_VOL_DOWN, BUTTON_NONE },
424 { ACTION_TREE_ROOT_INIT, BUTTON_RC_VOL_DOWN|BUTTON_REPEAT, BUTTON_RC_VOL_DOWN },
425 { ACTION_TREE_PGLEFT, BUTTON_RC_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE },
426 { ACTION_TREE_PGRIGHT, BUTTON_RC_VOL_UP, BUTTON_NONE },
427 { ACTION_TREE_PGRIGHT, BUTTON_RC_VOL_UP|BUTTON_REPEAT, BUTTON_NONE },
428 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_TREE|CONTEXT_REMOTE),
431 static const struct button_mapping button_context_listtree_scroll_wo_cmb_h300lcdremote[] = {
432 { ACTION_NONE, BUTTON_RC_REW, BUTTON_NONE },
433 { ACTION_STD_CANCEL, BUTTON_RC_REW|BUTTON_REL, BUTTON_RC_REW },
434 { ACTION_TREE_ROOT_INIT, BUTTON_RC_REW|BUTTON_REPEAT, BUTTON_RC_REW },
435 { ACTION_TREE_PGLEFT, BUTTON_RC_REW|BUTTON_REPEAT, BUTTON_NONE },
436 { ACTION_TREE_PGLEFT, BUTTON_RC_REW|BUTTON_REL, BUTTON_RC_REW|BUTTON_REPEAT },
437 { ACTION_NONE, BUTTON_RC_FF, BUTTON_NONE },
438 { ACTION_STD_OK, BUTTON_RC_FF|BUTTON_REL, BUTTON_RC_FF },
439 { ACTION_TREE_PGRIGHT, BUTTON_RC_FF|BUTTON_REPEAT, BUTTON_NONE },
440 { ACTION_TREE_PGRIGHT, BUTTON_RC_FF|BUTTON_REL, BUTTON_RC_FF|BUTTON_REPEAT },
441 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_TREE|CONTEXT_REMOTE),
444 static const struct button_mapping button_context_settings_h100remote[] = {
445 { ACTION_SETTINGS_INC, BUTTON_RC_REW, BUTTON_NONE },
446 { ACTION_SETTINGS_INCREPEAT, BUTTON_RC_REW|BUTTON_REPEAT, BUTTON_NONE },
447 { ACTION_SETTINGS_DEC, BUTTON_RC_FF, BUTTON_NONE },
448 { ACTION_SETTINGS_DECREPEAT, BUTTON_RC_FF|BUTTON_REPEAT, BUTTON_NONE },
449 /* { ACTION_NONE, BUTTON_RC_ON, BUTTON_NONE },
450 { ACTION_NONE, BUTTON_RC_STOP, BUTTON_NONE },
451 { ACTION_NONE, BUTTON_RC_MENU|BUTTON_REL, BUTTON_NONE },
453 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
454 }; /* button_context_settings */
456 static const struct button_mapping button_context_settings_h300lcdremote[] = {
457 { ACTION_SETTINGS_INC, BUTTON_RC_VOL_UP, BUTTON_NONE },
458 { ACTION_SETTINGS_INCREPEAT, BUTTON_RC_VOL_UP|BUTTON_REPEAT, BUTTON_NONE },
459 { ACTION_SETTINGS_DEC, BUTTON_RC_VOL_DOWN, BUTTON_NONE },
460 { ACTION_SETTINGS_DECREPEAT, BUTTON_RC_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE },
461 { ACTION_NONE, BUTTON_RC_REW, BUTTON_NONE },
462 { ACTION_NONE, BUTTON_RC_FF, BUTTON_NONE },
464 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
465 }; /* button_context_settings */
469 static const struct button_mapping button_context_settingsgraphical_h100remote[] = {
470 { ACTION_SETTINGS_INC, BUTTON_RC_FF, BUTTON_NONE },
471 { ACTION_SETTINGS_INCREPEAT, BUTTON_RC_FF|BUTTON_REPEAT, BUTTON_NONE },
472 { ACTION_SETTINGS_DEC, BUTTON_RC_REW, BUTTON_NONE },
473 { ACTION_SETTINGS_DECREPEAT, BUTTON_RC_REW|BUTTON_REPEAT, BUTTON_NONE },
474 { ACTION_STD_PREV, BUTTON_RC_SOURCE, BUTTON_NONE },
475 { ACTION_STD_PREVREPEAT, BUTTON_RC_SOURCE|BUTTON_REPEAT, BUTTON_NONE },
476 { ACTION_STD_NEXT, BUTTON_RC_BITRATE, BUTTON_NONE },
477 { ACTION_STD_NEXTREPEAT, BUTTON_RC_BITRATE|BUTTON_REPEAT, BUTTON_NONE },
479 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
480 }; /* button_context_settingsgraphical_h100remote */
482 static const struct button_mapping button_context_settingsgraphical_h300lcdremote[] = {
483 { ACTION_SETTINGS_INC, BUTTON_RC_FF, BUTTON_NONE },
484 { ACTION_SETTINGS_INCREPEAT, BUTTON_RC_FF|BUTTON_REPEAT, BUTTON_NONE },
485 { ACTION_SETTINGS_DEC, BUTTON_RC_REW, BUTTON_NONE },
486 { ACTION_SETTINGS_DECREPEAT, BUTTON_RC_REW|BUTTON_REPEAT,BUTTON_NONE },
487 { ACTION_STD_PREV, BUTTON_RC_VOL_UP, BUTTON_NONE },
488 { ACTION_STD_PREVREPEAT, BUTTON_RC_VOL_UP|BUTTON_REPEAT, BUTTON_NONE },
489 { ACTION_STD_NEXT, BUTTON_RC_VOL_DOWN, BUTTON_NONE },
490 { ACTION_STD_NEXTREPEAT, BUTTON_RC_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE },
492 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
493 }; /* button_context_settingsgraphical_h300remote */
495 static const struct button_mapping button_context_yesno_h100remote[] = {
496 { ACTION_YESNO_ACCEPT, BUTTON_RC_MENU, BUTTON_NONE },
497 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
498 }; /* button_context_settings_yesno */
500 static const struct button_mapping *button_context_yesno_h300lcdremote =
501 button_context_yesno_h100remote;
503 static const struct button_mapping button_context_bmark_h100remote[] = {
504 { ACTION_BMS_DELETE, BUTTON_RC_REC, BUTTON_NONE },
505 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST)
506 }; /* button_context_settings_bmark */
508 static const struct button_mapping *button_context_bmark_h300lcdremote =
509 button_context_bmark_h100remote;
511 static const struct button_mapping button_context_quickscreen_nonlcdremote[] = {
512 { ACTION_QS_TOP, BUTTON_RC_VOL_UP, BUTTON_NONE },
513 { ACTION_QS_TOP, BUTTON_RC_VOL_UP|BUTTON_REPEAT, BUTTON_NONE },
514 { ACTION_QS_DOWN, BUTTON_RC_VOL_DOWN, BUTTON_NONE },
515 { ACTION_QS_DOWN, BUTTON_RC_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE },
516 { ACTION_QS_LEFT, BUTTON_RC_REW, BUTTON_NONE },
517 { ACTION_QS_LEFT, BUTTON_RC_REW|BUTTON_REPEAT, BUTTON_NONE },
518 { ACTION_QS_RIGHT, BUTTON_RC_FF, BUTTON_NONE },
519 { ACTION_QS_RIGHT, BUTTON_RC_FF|BUTTON_REPEAT, BUTTON_NONE },
520 { ACTION_STD_CANCEL, BUTTON_RC_ON, BUTTON_NONE },
522 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
523 }; /* button_context_quickscreen */
525 static const struct button_mapping button_context_quickscreen_h100lcdremote[] = {
526 { ACTION_QS_TOP, BUTTON_RC_VOL_UP, BUTTON_NONE },
527 { ACTION_QS_TOP, BUTTON_RC_VOL_UP|BUTTON_REPEAT, BUTTON_NONE },
528 { ACTION_QS_DOWN, BUTTON_RC_VOL_DOWN, BUTTON_NONE },
529 { ACTION_QS_DOWN, BUTTON_RC_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE },
530 { ACTION_QS_LEFT, BUTTON_RC_REW, BUTTON_NONE },
531 { ACTION_QS_LEFT, BUTTON_RC_REW|BUTTON_REPEAT, BUTTON_NONE },
532 { ACTION_QS_LEFT, BUTTON_RC_FF, BUTTON_NONE },
533 { ACTION_QS_LEFT, BUTTON_RC_FF|BUTTON_REPEAT, BUTTON_NONE },
534 { ACTION_QS_RIGHT, BUTTON_RC_SOURCE, BUTTON_NONE },
535 { ACTION_QS_RIGHT, BUTTON_RC_SOURCE|BUTTON_REPEAT, BUTTON_NONE },
536 { ACTION_QS_RIGHT, BUTTON_RC_BITRATE, BUTTON_NONE },
537 { ACTION_QS_RIGHT, BUTTON_RC_BITRATE|BUTTON_REPEAT, BUTTON_NONE },
538 { ACTION_STD_CANCEL, BUTTON_RC_MODE, BUTTON_NONE },
540 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
541 }; /* button_context_quickscreen */
543 static const struct button_mapping button_context_quickscreen_h300lcdremote[] = {
544 { ACTION_QS_TOP, BUTTON_RC_VOL_UP, BUTTON_NONE },
545 { ACTION_QS_TOP, BUTTON_RC_VOL_UP|BUTTON_REPEAT, BUTTON_NONE },
546 { ACTION_QS_DOWN, BUTTON_RC_VOL_DOWN, BUTTON_NONE },
547 { ACTION_QS_DOWN, BUTTON_RC_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE },
548 { ACTION_QS_LEFT, BUTTON_RC_REW, BUTTON_NONE },
549 { ACTION_QS_LEFT, BUTTON_RC_REW|BUTTON_REPEAT, BUTTON_NONE },
550 { ACTION_QS_RIGHT, BUTTON_RC_FF, BUTTON_NONE },
551 { ACTION_QS_RIGHT, BUTTON_RC_FF|BUTTON_REPEAT, BUTTON_NONE },
552 { ACTION_STD_CANCEL, BUTTON_RC_MODE, BUTTON_NONE },
554 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
555 }; /* button_context_quickscreen */
557 static const struct button_mapping button_context_pitchscreen_nonlcdremote[] = {
558 { ACTION_PS_INC_SMALL, BUTTON_RC_VOL_UP, BUTTON_NONE },
559 { ACTION_PS_INC_BIG, BUTTON_RC_VOL_UP|BUTTON_REPEAT, BUTTON_NONE },
560 { ACTION_PS_DEC_SMALL, BUTTON_RC_VOL_DOWN, BUTTON_NONE },
561 { ACTION_PS_DEC_BIG, BUTTON_RC_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE },
562 { ACTION_PS_NUDGE_LEFT, BUTTON_RC_REW, BUTTON_NONE },
563 { ACTION_PS_NUDGE_LEFTOFF, BUTTON_RC_REW|BUTTON_REL, BUTTON_NONE },
564 { ACTION_PS_NUDGE_RIGHT, BUTTON_RC_FF, BUTTON_NONE },
565 { ACTION_PS_NUDGE_RIGHTOFF, BUTTON_RC_FF|BUTTON_REL, BUTTON_NONE },
566 { ACTION_PS_RESET, BUTTON_RC_MENU, BUTTON_NONE },
567 { ACTION_PS_EXIT, BUTTON_RC_ON, BUTTON_NONE },
568 { ACTION_PS_EXIT, BUTTON_RC_STOP, BUTTON_NONE },
569 { ACTION_PS_SLOWER, BUTTON_RC_REW|BUTTON_REPEAT,BUTTON_NONE },
570 { ACTION_PS_FASTER, BUTTON_RC_FF|BUTTON_REPEAT, BUTTON_NONE },
572 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
573 }; /* button_context_pitchcreen */
575 static const struct button_mapping button_context_pitchscreen_h100lcdremote[] = {
576 { ACTION_PS_INC_SMALL, BUTTON_RC_FF, BUTTON_NONE },
577 { ACTION_PS_INC_BIG, BUTTON_RC_FF|BUTTON_REPEAT, BUTTON_NONE },
578 { ACTION_PS_DEC_SMALL, BUTTON_RC_REW, BUTTON_NONE },
579 { ACTION_PS_DEC_BIG, BUTTON_RC_REW|BUTTON_REPEAT, BUTTON_NONE },
580 { ACTION_PS_NUDGE_LEFT, BUTTON_RC_SOURCE, BUTTON_NONE },
581 { ACTION_PS_NUDGE_LEFTOFF, BUTTON_RC_SOURCE|BUTTON_REL, BUTTON_NONE },
582 { ACTION_PS_NUDGE_RIGHT, BUTTON_RC_BITRATE, BUTTON_NONE },
583 { ACTION_PS_NUDGE_RIGHTOFF, BUTTON_RC_BITRATE|BUTTON_REL, BUTTON_NONE },
584 { ACTION_PS_RESET, BUTTON_RC_MENU, BUTTON_NONE },
585 { ACTION_PS_EXIT, BUTTON_RC_ON, BUTTON_NONE },
586 { ACTION_PS_EXIT, BUTTON_RC_STOP, BUTTON_NONE },
587 { ACTION_PS_SLOWER, BUTTON_RC_SOURCE|BUTTON_REPEAT, BUTTON_NONE },
588 { ACTION_PS_FASTER, BUTTON_RC_BITRATE|BUTTON_REPEAT, BUTTON_NONE },
590 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
593 static const struct button_mapping button_context_pitchscreen_h300lcdremote[] = {
594 { ACTION_PS_INC_SMALL, BUTTON_RC_VOL_UP, BUTTON_NONE },
595 { ACTION_PS_INC_BIG, BUTTON_RC_VOL_UP|BUTTON_REPEAT, BUTTON_NONE },
596 { ACTION_PS_DEC_SMALL, BUTTON_RC_VOL_DOWN, BUTTON_NONE },
597 { ACTION_PS_DEC_BIG, BUTTON_RC_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE },
598 { ACTION_PS_NUDGE_LEFT, BUTTON_RC_REW, BUTTON_NONE },
599 { ACTION_PS_NUDGE_LEFTOFF, BUTTON_RC_REW|BUTTON_REL, BUTTON_NONE },
600 { ACTION_PS_NUDGE_RIGHT, BUTTON_RC_FF, BUTTON_NONE },
601 { ACTION_PS_NUDGE_RIGHTOFF, BUTTON_RC_FF|BUTTON_REL, BUTTON_NONE },
602 { ACTION_PS_RESET, BUTTON_RC_MENU, BUTTON_NONE },
603 { ACTION_PS_EXIT, BUTTON_RC_ON, BUTTON_NONE },
604 { ACTION_PS_EXIT, BUTTON_RC_STOP, BUTTON_NONE },
605 { ACTION_PS_SLOWER, BUTTON_RC_REW|BUTTON_REPEAT,BUTTON_NONE },
606 { ACTION_PS_FASTER, BUTTON_RC_FF|BUTTON_REPEAT, BUTTON_NONE },
608 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
611 static const struct button_mapping button_context_recscreen_h100remote[] = {
612 { ACTION_REC_LCD, BUTTON_RC_VOL_DOWN, BUTTON_NONE },
613 { ACTION_REC_PAUSE, BUTTON_RC_ON, BUTTON_NONE },
614 { ACTION_REC_NEWFILE, BUTTON_RC_REC, BUTTON_NONE },
615 { ACTION_SETTINGS_INC, BUTTON_RC_BITRATE, BUTTON_NONE },
616 { ACTION_SETTINGS_INCREPEAT, BUTTON_RC_BITRATE|BUTTON_REPEAT, BUTTON_NONE },
617 { ACTION_SETTINGS_DEC, BUTTON_RC_SOURCE, BUTTON_NONE },
618 { ACTION_SETTINGS_DECREPEAT, BUTTON_RC_SOURCE|BUTTON_REPEAT, BUTTON_NONE },
620 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
621 }; /* button_context_recscreen_h100remote */
623 static const struct button_mapping button_context_recscreen_h300lcdremote[] = {
624 { ACTION_REC_LCD, BUTTON_RC_SOURCE, BUTTON_NONE },
625 { ACTION_REC_PAUSE, BUTTON_RC_ON, BUTTON_NONE },
626 { ACTION_REC_NEWFILE, BUTTON_RC_REC, BUTTON_NONE },
627 { ACTION_SETTINGS_INC, BUTTON_RC_FF, BUTTON_NONE },
628 { ACTION_SETTINGS_INC, BUTTON_RC_FF|BUTTON_REPEAT, BUTTON_NONE },
629 { ACTION_SETTINGS_DEC, BUTTON_RC_REW, BUTTON_NONE },
630 { ACTION_SETTINGS_DEC, BUTTON_RC_REW|BUTTON_REPEAT, BUTTON_NONE },
632 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
633 }; /* button_context_recscreen_h300lcdremote */
635 static const struct button_mapping button_context_keyboard_h100remote[] = {
636 { ACTION_KBD_LEFT, BUTTON_RC_REW, BUTTON_NONE },
637 { ACTION_KBD_LEFT, BUTTON_RC_REW|BUTTON_REPEAT, BUTTON_NONE },
638 { ACTION_KBD_RIGHT, BUTTON_RC_FF, BUTTON_NONE },
639 { ACTION_KBD_RIGHT, BUTTON_RC_FF|BUTTON_REPEAT, BUTTON_NONE },
640 { ACTION_KBD_CURSOR_LEFT, BUTTON_RC_ON|BUTTON_RC_REW, BUTTON_NONE },
641 { ACTION_KBD_CURSOR_LEFT, BUTTON_RC_ON|BUTTON_RC_REW|BUTTON_REPEAT, BUTTON_NONE },
642 { ACTION_KBD_CURSOR_RIGHT, BUTTON_RC_ON|BUTTON_RC_FF, BUTTON_NONE },
643 { ACTION_KBD_CURSOR_RIGHT, BUTTON_RC_ON|BUTTON_RC_FF|BUTTON_REPEAT, BUTTON_NONE },
644 { ACTION_KBD_CURSOR_LEFT, BUTTON_RC_VOL_DOWN, BUTTON_NONE },
645 { ACTION_KBD_CURSOR_LEFT, BUTTON_RC_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE },
646 { ACTION_KBD_CURSOR_RIGHT, BUTTON_RC_VOL_UP, BUTTON_NONE },
647 { ACTION_KBD_CURSOR_RIGHT, BUTTON_RC_VOL_UP|BUTTON_REPEAT, BUTTON_NONE },
648 { ACTION_KBD_SELECT, BUTTON_RC_MENU, BUTTON_NONE },
649 { ACTION_KBD_PAGE_FLIP, BUTTON_RC_MODE, BUTTON_NONE },
650 { ACTION_KBD_DONE, BUTTON_RC_ON|BUTTON_REL, BUTTON_RC_ON },
651 { ACTION_KBD_ABORT, BUTTON_RC_STOP, BUTTON_NONE },
652 { ACTION_KBD_BACKSPACE, BUTTON_RC_REC, BUTTON_NONE },
653 { ACTION_KBD_BACKSPACE, BUTTON_RC_REC|BUTTON_REPEAT, BUTTON_NONE },
654 { ACTION_KBD_UP, BUTTON_RC_SOURCE, BUTTON_NONE },
655 { ACTION_KBD_UP, BUTTON_RC_SOURCE|BUTTON_REPEAT, BUTTON_NONE },
656 { ACTION_KBD_DOWN, BUTTON_RC_BITRATE, BUTTON_NONE },
657 { ACTION_KBD_DOWN, BUTTON_RC_BITRATE|BUTTON_REPEAT, BUTTON_NONE },
658 { ACTION_KBD_MORSE_INPUT, BUTTON_RC_ON|BUTTON_RC_MODE, BUTTON_NONE },
659 { ACTION_KBD_MORSE_SELECT, BUTTON_RC_MENU|BUTTON_REL, BUTTON_NONE },
661 LAST_ITEM_IN_LIST
662 }; /* button_context_keyboard_h100remote */
664 static const struct button_mapping button_context_keyboard_h300lcdremote[] = {
665 { ACTION_KBD_LEFT, BUTTON_RC_REW, BUTTON_NONE },
666 { ACTION_KBD_LEFT, BUTTON_RC_REW|BUTTON_REPEAT, BUTTON_NONE },
667 { ACTION_KBD_RIGHT, BUTTON_RC_FF, BUTTON_NONE },
668 { ACTION_KBD_RIGHT, BUTTON_RC_FF|BUTTON_REPEAT, BUTTON_NONE },
669 { ACTION_KBD_CURSOR_LEFT, BUTTON_RC_SOURCE, BUTTON_NONE },
670 { ACTION_KBD_CURSOR_LEFT, BUTTON_RC_SOURCE|BUTTON_REPEAT, BUTTON_NONE },
671 { ACTION_KBD_CURSOR_RIGHT, BUTTON_RC_BITRATE, BUTTON_NONE },
672 { ACTION_KBD_CURSOR_RIGHT, BUTTON_RC_BITRATE|BUTTON_REPEAT, BUTTON_NONE },
673 { ACTION_KBD_SELECT, BUTTON_RC_MENU, BUTTON_NONE },
674 { ACTION_KBD_PAGE_FLIP, BUTTON_RC_MODE, BUTTON_NONE },
675 { ACTION_KBD_DONE, BUTTON_RC_ON, BUTTON_NONE },
676 { ACTION_KBD_ABORT, BUTTON_RC_STOP, BUTTON_NONE },
677 { ACTION_KBD_BACKSPACE, BUTTON_RC_REC, BUTTON_NONE },
678 { ACTION_KBD_BACKSPACE, BUTTON_RC_REC|BUTTON_REPEAT, BUTTON_NONE },
679 { ACTION_KBD_UP, BUTTON_RC_VOL_UP, BUTTON_NONE },
680 { ACTION_KBD_UP, BUTTON_RC_VOL_UP|BUTTON_REPEAT, BUTTON_NONE },
681 { ACTION_KBD_DOWN, BUTTON_RC_VOL_DOWN, BUTTON_NONE },
682 { ACTION_KBD_DOWN, BUTTON_RC_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE },
683 { ACTION_KBD_MORSE_INPUT, BUTTON_RC_MENU|BUTTON_RC_MODE, BUTTON_NONE },
684 { ACTION_KBD_MORSE_SELECT, BUTTON_RC_MENU|BUTTON_REL, BUTTON_NONE },
686 LAST_ITEM_IN_LIST
687 }; /* button_context_keyboard_h300lcdremote */
689 static const struct button_mapping button_context_radio_h100remote[] = {
690 { ACTION_FM_MENU, BUTTON_RC_MENU | BUTTON_REPEAT, BUTTON_NONE },
691 { ACTION_FM_PRESET, BUTTON_RC_MENU | BUTTON_REL, BUTTON_RC_MENU },
692 { ACTION_FM_STOP, BUTTON_RC_STOP, BUTTON_NONE },
693 { ACTION_FM_MODE, BUTTON_RC_ON | BUTTON_REPEAT, BUTTON_RC_ON },
694 { ACTION_FM_EXIT, BUTTON_RC_MODE | BUTTON_REL, BUTTON_RC_MODE },
695 { ACTION_FM_QUICKSCREEN, BUTTON_RC_MODE|BUTTON_REPEAT, BUTTON_RC_MODE },
696 { ACTION_FM_PLAY, BUTTON_RC_ON | BUTTON_REL, BUTTON_RC_ON },
697 { ACTION_FM_NEXT_PRESET, BUTTON_RC_BITRATE, BUTTON_NONE },
698 { ACTION_FM_PREV_PRESET, BUTTON_RC_SOURCE, BUTTON_NONE },
699 { ACTION_SETTINGS_INC, BUTTON_RC_VOL_UP, BUTTON_NONE },
700 { ACTION_SETTINGS_INCREPEAT, BUTTON_RC_VOL_UP|BUTTON_REPEAT, BUTTON_NONE },
701 { ACTION_SETTINGS_DEC, BUTTON_RC_VOL_DOWN, BUTTON_NONE },
702 { ACTION_SETTINGS_DECREPEAT, BUTTON_RC_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE },
703 { ACTION_STD_PREV, BUTTON_RC_REW, BUTTON_NONE },
704 { ACTION_STD_PREVREPEAT, BUTTON_RC_REW|BUTTON_REPEAT, BUTTON_NONE },
705 { ACTION_STD_NEXT, BUTTON_RC_FF, BUTTON_NONE },
706 { ACTION_STD_NEXTREPEAT, BUTTON_RC_FF|BUTTON_REPEAT, BUTTON_NONE },
708 LAST_ITEM_IN_LIST
711 static const struct button_mapping button_context_radio_h300lcdremote[] = {
712 { ACTION_FM_MENU, BUTTON_RC_MENU | BUTTON_REPEAT, BUTTON_NONE },
713 { ACTION_FM_PRESET, BUTTON_RC_MENU | BUTTON_REL, BUTTON_RC_MENU },
714 { ACTION_FM_STOP, BUTTON_RC_STOP, BUTTON_NONE },
715 { ACTION_FM_MODE, BUTTON_RC_ON | BUTTON_REPEAT, BUTTON_RC_ON },
716 { ACTION_FM_EXIT, BUTTON_RC_MODE | BUTTON_REL, BUTTON_RC_MODE },
717 { ACTION_FM_QUICKSCREEN, BUTTON_RC_MODE|BUTTON_REPEAT, BUTTON_RC_MODE },
718 { ACTION_FM_PLAY, BUTTON_RC_ON | BUTTON_REL, BUTTON_RC_ON },
719 { ACTION_FM_NEXT_PRESET, BUTTON_RC_BITRATE, BUTTON_NONE },
720 { ACTION_FM_PREV_PRESET, BUTTON_RC_SOURCE, BUTTON_NONE },
721 { ACTION_STD_PREV, BUTTON_RC_REW, BUTTON_NONE },
722 { ACTION_STD_PREVREPEAT, BUTTON_RC_REW|BUTTON_REPEAT, BUTTON_NONE },
723 { ACTION_STD_NEXT, BUTTON_RC_FF, BUTTON_NONE },
724 { ACTION_STD_NEXTREPEAT, BUTTON_RC_FF|BUTTON_REPEAT, BUTTON_NONE },
726 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS)
730 static const struct button_mapping button_context_time_remote[] = {
731 { ACTION_STD_CANCEL, BUTTON_OFF, BUTTON_NONE },
732 { ACTION_STD_OK, BUTTON_ON, BUTTON_NONE },
733 { ACTION_SETTINGS_INC, BUTTON_RC_BITRATE, BUTTON_NONE },
734 { ACTION_SETTINGS_DEC, BUTTON_RC_SOURCE, BUTTON_NONE },
735 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS),
736 }; /* button_context_settings_bmark */
738 /* the actual used tables */
739 static const struct button_mapping
740 *remote_btn_ctxt_std = 0,
741 *remote_btn_ctxt_wps = 0,
742 *remote_btn_ctxt_list = 0,
743 *remote_btn_ctxt_tree = 0,
744 *remote_btn_ctxt_listtree_scroll_w_cmb = 0,
745 *remote_btn_ctxt_listtree_scroll_wo_cmb = 0,
746 *remote_btn_ctxt_settings = 0,
747 *remote_btn_ctxt_settingsgrph = 0,
748 *remote_btn_ctxt_yesno = 0,
749 *remote_btn_ctxt_bmark = 0,
750 *remote_btn_ctxt_quickscreen = 0,
751 *remote_btn_ctxt_pitchscreen = 0,
752 *remote_btn_ctxt_recscreen = 0,
753 *remote_btn_ctxt_keyboard = 0,
754 *remote_btn_ctxt_radio = 0;
756 static int _remote_type = -1; /*safe value, forces the first press to init the mappings */
758 static void remap_remote(void)
760 _remote_type = remote_type();
761 switch(_remote_type)
763 case REMOTETYPE_UNPLUGGED:
764 remote_btn_ctxt_std = NULL;
765 remote_btn_ctxt_wps = NULL;
766 remote_btn_ctxt_list = NULL;
767 remote_btn_ctxt_tree = NULL;
768 remote_btn_ctxt_listtree_scroll_w_cmb = NULL;
769 remote_btn_ctxt_listtree_scroll_wo_cmb = NULL;
770 remote_btn_ctxt_settings = NULL;
771 remote_btn_ctxt_settingsgrph = NULL;
772 remote_btn_ctxt_yesno = NULL;
773 remote_btn_ctxt_bmark = NULL;
774 remote_btn_ctxt_quickscreen = NULL;
775 remote_btn_ctxt_pitchscreen = NULL;
776 remote_btn_ctxt_recscreen = NULL;
777 remote_btn_ctxt_keyboard = NULL;
778 remote_btn_ctxt_radio = NULL;
779 break;
781 case REMOTETYPE_H100_LCD:
782 remote_btn_ctxt_std = button_context_standard_h100remote,
783 remote_btn_ctxt_wps = button_context_wps_h100remote,
784 remote_btn_ctxt_list = button_context_list_h100remote,
785 remote_btn_ctxt_tree = button_context_tree_h100remote,
786 remote_btn_ctxt_listtree_scroll_w_cmb
787 = button_context_listtree_scroll_w_cmb_h100remote,
788 remote_btn_ctxt_listtree_scroll_wo_cmb
789 = button_context_listtree_scroll_wo_cmb_h100remote,
790 remote_btn_ctxt_settings = button_context_settings_h100remote,
791 remote_btn_ctxt_settingsgrph
792 = button_context_settingsgraphical_h100remote,
793 remote_btn_ctxt_yesno = button_context_yesno_h100remote,
794 remote_btn_ctxt_bmark = button_context_bmark_h100remote,
795 remote_btn_ctxt_quickscreen
796 = button_context_quickscreen_h100lcdremote,
797 remote_btn_ctxt_pitchscreen
798 = button_context_pitchscreen_h100lcdremote,
799 remote_btn_ctxt_recscreen
800 = button_context_recscreen_h100remote,
801 remote_btn_ctxt_keyboard
802 = button_context_keyboard_h100remote,
803 remote_btn_ctxt_radio
804 = button_context_radio_h100remote;
805 break;
807 case REMOTETYPE_H300_LCD:
808 remote_btn_ctxt_std = button_context_standard_h300lcdremote,
809 remote_btn_ctxt_wps = button_context_wps_h300lcdremote,
810 remote_btn_ctxt_list = button_context_list_h300lcdremote,
811 remote_btn_ctxt_tree = button_context_tree_h300lcdremote,
812 remote_btn_ctxt_listtree_scroll_w_cmb
813 = button_context_listtree_scroll_w_cmb_h300lcdremote,
814 remote_btn_ctxt_listtree_scroll_wo_cmb
815 = button_context_listtree_scroll_wo_cmb_h300lcdremote,
816 remote_btn_ctxt_settings = button_context_settings_h300lcdremote,
817 remote_btn_ctxt_settingsgrph
818 = button_context_settingsgraphical_h300lcdremote,
819 remote_btn_ctxt_yesno = button_context_yesno_h300lcdremote,
820 remote_btn_ctxt_bmark = button_context_bmark_h300lcdremote,
821 remote_btn_ctxt_quickscreen
822 = button_context_quickscreen_h300lcdremote,
823 remote_btn_ctxt_pitchscreen
824 = button_context_pitchscreen_h300lcdremote,
825 remote_btn_ctxt_recscreen
826 = button_context_recscreen_h300lcdremote,
827 remote_btn_ctxt_keyboard
828 = button_context_keyboard_h300lcdremote,
829 remote_btn_ctxt_radio
830 = button_context_radio_h300lcdremote;
831 break;
833 case REMOTETYPE_H300_NONLCD: /* FIXME: add its tables */
834 remote_btn_ctxt_std = button_context_standard_h300lcdremote,
835 remote_btn_ctxt_wps = button_context_wps_h300lcdremote,
836 remote_btn_ctxt_list = button_context_list_h300lcdremote,
837 remote_btn_ctxt_tree = button_context_tree_h300lcdremote,
838 remote_btn_ctxt_listtree_scroll_w_cmb
839 = button_context_listtree_scroll_w_cmb_h300lcdremote,
840 remote_btn_ctxt_listtree_scroll_wo_cmb
841 = button_context_listtree_scroll_wo_cmb_h300lcdremote,
842 remote_btn_ctxt_settings = button_context_settings_h300lcdremote,
843 remote_btn_ctxt_settingsgrph
844 = button_context_settingsgraphical_h300lcdremote,
845 remote_btn_ctxt_yesno = button_context_yesno_h300lcdremote,
846 remote_btn_ctxt_bmark = button_context_bmark_h300lcdremote,
847 remote_btn_ctxt_quickscreen
848 = button_context_quickscreen_nonlcdremote,
849 remote_btn_ctxt_pitchscreen
850 = button_context_pitchscreen_nonlcdremote,
851 remote_btn_ctxt_recscreen
852 = button_context_recscreen_h300lcdremote,
853 remote_btn_ctxt_keyboard
854 = button_context_keyboard_h300lcdremote,
855 remote_btn_ctxt_radio
856 = button_context_radio_h300lcdremote;
857 #if 0
858 remote_btn_ctxt_std =
859 remote_btn_ctxt_wps =
860 remote_btn_ctxt_list =
861 remote_btn_ctxt_tree =
862 remote_btn_ctxt_listtree_scroll_w_cmb =
863 remote_btn_ctxt_listtree_scroll_wo_cmb =
864 remote_btn_ctxt_settings =
865 remote_btn_ctxt_settingsgrph =
866 remote_btn_ctxt_yesno =
867 remote_btn_ctxt_bmark =
868 remote_btn_ctxt_quickscreen =
869 remote_btn_ctxt_pitchscreen =
870 remote_btn_ctxt_recscreen =
871 remote_btn_ctxt_keyboard =
872 remote_btn_ctxt_radio =
873 #endif
874 break;
880 static const struct button_mapping* get_context_mapping_remote(int context)
882 if(remote_type() != _remote_type)
883 remap_remote();
884 context ^= CONTEXT_REMOTE;
886 switch (context)
888 case CONTEXT_STD:
889 return remote_btn_ctxt_std;
890 case CONTEXT_WPS: /* common for all remotes */
891 return button_context_wps_remotescommon;
893 case CONTEXT_CUSTOM|CONTEXT_WPS:
894 return remote_btn_ctxt_wps;
896 case CONTEXT_LIST:
897 return remote_btn_ctxt_list;
898 case CONTEXT_TREE:
899 case CONTEXT_MAINMENU:
900 if (global_settings.hold_lr_for_scroll_in_list)
901 return remote_btn_ctxt_listtree_scroll_wo_cmb;
902 else
903 return remote_btn_ctxt_listtree_scroll_w_cmb;
904 case CONTEXT_CUSTOM|CONTEXT_TREE:
905 return remote_btn_ctxt_tree;
906 case CONTEXT_SETTINGS_TIME:
907 case CONTEXT_SETTINGS_RECTRIGGER:
908 return remote_btn_ctxt_settingsgrph;
910 case CONTEXT_SETTINGS:
911 return remote_btn_ctxt_settings;
913 case CONTEXT_YESNOSCREEN:
914 return remote_btn_ctxt_yesno;
916 case CONTEXT_BOOKMARKSCREEN:
917 return remote_btn_ctxt_bmark;
918 case CONTEXT_QUICKSCREEN:
919 return remote_btn_ctxt_quickscreen;
920 case CONTEXT_PITCHSCREEN:
921 return remote_btn_ctxt_pitchscreen;
922 case CONTEXT_RECSCREEN:
923 return remote_btn_ctxt_recscreen;
924 case CONTEXT_KEYBOARD:
925 case CONTEXT_MORSE_INPUT:
926 return remote_btn_ctxt_keyboard;
927 case CONTEXT_FM:
928 return remote_btn_ctxt_radio;
930 return remote_btn_ctxt_std;
933 const struct button_mapping* get_context_mapping(int context)
935 if (context&CONTEXT_REMOTE)
936 return get_context_mapping_remote(context);
938 switch (context)
940 case CONTEXT_STD:
941 return button_context_standard;
942 case CONTEXT_WPS:
943 return button_context_wps;
945 case CONTEXT_LIST:
946 return button_context_list;
947 case CONTEXT_TREE:
948 case CONTEXT_MAINMENU:
949 if (global_settings.hold_lr_for_scroll_in_list)
950 return button_context_listtree_scroll_without_combo;
951 else
952 return button_context_listtree_scroll_with_combo;
953 case CONTEXT_CUSTOM|CONTEXT_TREE:
954 return button_context_tree;
956 case CONTEXT_SETTINGS:
957 return button_context_settings;
958 case CONTEXT_CUSTOM|CONTEXT_SETTINGS:
959 case CONTEXT_SETTINGS_RECTRIGGER:
960 return button_context_settings_right_is_inc;
962 case CONTEXT_SETTINGS_COLOURCHOOSER:
963 return button_context_colorchooser;
964 case CONTEXT_SETTINGS_EQ:
965 return button_context_eq;
967 case CONTEXT_SETTINGS_TIME:
968 return button_context_time;
970 case CONTEXT_YESNOSCREEN:
971 return button_context_yesno;
972 case CONTEXT_BOOKMARKSCREEN:
973 return button_context_bmark;
974 case CONTEXT_QUICKSCREEN:
975 return button_context_quickscreen;
976 case CONTEXT_PITCHSCREEN:
977 return button_context_pitchscreen;
978 case CONTEXT_RECSCREEN:
979 return button_context_recscreen;
980 case CONTEXT_KEYBOARD:
981 case CONTEXT_MORSE_INPUT:
982 return button_context_keyboard;
983 case CONTEXT_FM:
984 return button_context_radio;
986 return button_context_standard;