1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 * Copyright (C) 2010 Marcin Bukat
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 ****************************************************************************/
27 * The format of the list is as follows
28 * { Action Code, Button code, Prereq button code }
29 * if there's no need to check the previous button's value, use BUTTON_NONE
30 * Insert LAST_ITEM_IN_LIST at the end of each mapping
33 /*****************************************************************************
34 * Main control mappings
35 *****************************************************************************/
37 static const struct button_mapping button_context_standard
[] = {
38 { ACTION_STD_PREV
, BUTTON_PREV
, BUTTON_NONE
},
39 { ACTION_STD_PREVREPEAT
, BUTTON_PREV
|BUTTON_REPEAT
, BUTTON_NONE
},
40 { ACTION_STD_NEXT
, BUTTON_NEXT
, BUTTON_NONE
},
41 { ACTION_STD_NEXTREPEAT
, BUTTON_NEXT
|BUTTON_REPEAT
, BUTTON_NONE
},
42 { ACTION_STD_OK
, BUTTON_SELECT
|BUTTON_REL
, BUTTON_SELECT
},
43 { ACTION_STD_CANCEL
, BUTTON_REC
|BUTTON_REL
, BUTTON_REC
},
44 { ACTION_STD_CONTEXT
, BUTTON_SELECT
|BUTTON_REPEAT
, BUTTON_SELECT
},
45 { ACTION_STD_MENU
, BUTTON_REC
|BUTTON_REPEAT
, BUTTON_REC
},
46 /* { ACTION_STD_QUICKSCREEN, BUTTON_, BUTTON_ }, */
47 /* { ACTION_STD_KEYLOCK, BUTTON_, BUTTON_ }, */
48 /* { ACTION_STD_REC, BUTTON_, BUTTON_ }, */
49 /* { ACTION_STD_HOTKEY, BUTTON_, BUTTON_ }, */
50 /* { ACTION_F3, BUTTON_, BUTTON_ }, */
53 }; /* button_context_standard */
55 static const struct button_mapping button_context_tree
[] = {
56 /* { ACTION_TREE_ROOT_INIT, BUTTON_, BUTTON_ }, */
57 /* { ACTION_TREE_PGLEFT, BUTTON_, BUTTON_ }, */
58 /* { ACTION_TREE_PGRIGHT, BUTTON_, BUTTON_ }, */
59 { ACTION_TREE_STOP
, BUTTON_PLAY
|BUTTON_REPEAT
, BUTTON_PLAY
},
60 { ACTION_TREE_WPS
, BUTTON_PLAY
|BUTTON_REL
, BUTTON_PLAY
},
61 /* { ACTION_TREE_HOTKEY, BUTTON_, BUTTON_ }, */
63 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
64 }; /* button_context_tree */
66 static const struct button_mapping button_context_wps
[] = {
67 { ACTION_WPS_BROWSE
, BUTTON_SELECT
|BUTTON_REL
, BUTTON_SELECT
},
68 { ACTION_WPS_PLAY
, BUTTON_PLAY
|BUTTON_REL
, BUTTON_PLAY
},
69 { ACTION_WPS_SEEKBACK
, BUTTON_PREV
|BUTTON_REPEAT
, BUTTON_NONE
},
70 { ACTION_WPS_SEEKFWD
, BUTTON_NEXT
|BUTTON_REPEAT
, BUTTON_NONE
},
71 { ACTION_WPS_STOPSEEK
, BUTTON_PREV
|BUTTON_REL
, BUTTON_PREV
|BUTTON_REPEAT
},
72 { ACTION_WPS_STOPSEEK
, BUTTON_NEXT
|BUTTON_REL
, BUTTON_NEXT
|BUTTON_REPEAT
},
73 { ACTION_WPS_SKIPNEXT
, BUTTON_NEXT
|BUTTON_REL
, BUTTON_NEXT
},
74 { ACTION_WPS_SKIPPREV
, BUTTON_PREV
|BUTTON_REL
, BUTTON_PREV
},
75 { ACTION_WPS_STOP
, BUTTON_PLAY
|BUTTON_REPEAT
, BUTTON_PLAY
},
76 { ACTION_WPS_VOLDOWN
, BUTTON_VOL_DOWN
, BUTTON_NONE
},
77 { ACTION_WPS_VOLDOWN
, BUTTON_VOL_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
78 { ACTION_WPS_VOLUP
, BUTTON_VOL_UP
, BUTTON_NONE
},
79 { ACTION_WPS_VOLUP
, BUTTON_VOL_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
80 /* { ACTION_WPS_PITCHSCREEN, BUTTON_, BUTTON_ }, */
81 /* { ACTION_WPS_ID3SCREEN, BUTTON_, BUTTON_ }, */
82 { ACTION_WPS_CONTEXT
, BUTTON_SELECT
|BUTTON_REPEAT
, BUTTON_SELECT
},
83 { ACTION_WPS_QUICKSCREEN
, BUTTON_REC
|BUTTON_REPEAT
, BUTTON_REC
},
84 { ACTION_WPS_MENU
, BUTTON_REC
|BUTTON_REL
, BUTTON_REC
},
85 /* { ACTION_WPS_VIEW_PLAYLIST, BUTTON_, BUTTON_ }, */
86 /* { ACTION_WPS_REC, BUTTON_, BUTTON_ }, */
87 /* { ACTION_WPS_ABSETA_PREVDIR, BUTTON_, BUTTON_ }, */
88 /* { ACTION_WPS_ABSETB_NEXTDIR, BUTTON_, BUTTON_ }, */
89 /* { ACTION_WPS_ABRESET, BUTTON_, BUTTON_ }, */
90 /* { ACTION_WPS_HOTKEY, BUTTON_, BUTTON_ }, */
93 }; /* button_context_wps */
95 static const struct button_mapping button_context_settings
[] = {
96 { ACTION_SETTINGS_INC
, BUTTON_VOL_UP
, BUTTON_NONE
},
97 { ACTION_SETTINGS_INCREPEAT
, BUTTON_VOL_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
98 /* { ACTION_SETTINGS_INCBIGSTEP,BUTTON_, BUTTON_ }, */
99 { ACTION_SETTINGS_DEC
, BUTTON_VOL_DOWN
, BUTTON_NONE
},
100 { ACTION_SETTINGS_DECREPEAT
, BUTTON_VOL_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
101 /* { ACTION_SETTINGS_DECBIGSTEP,BUTTON_, BUTTON_ }, */
103 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
104 }; /* button_context_settings */
106 static const struct button_mapping button_context_yesno
[] = {
107 { ACTION_YESNO_ACCEPT
, BUTTON_SELECT
, BUTTON_NONE
},
108 { ACTION_YESNO_ACCEPT
, BUTTON_PLAY
, BUTTON_NONE
},
111 }; /* button_context_yesno */
113 static const struct button_mapping button_context_bmark
[] = {
114 { ACTION_BMS_DELETE
, BUTTON_REC
|BUTTON_REPEAT
, BUTTON_REC
},
116 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST
),
117 }; /* button_context_bmark */
119 static const struct button_mapping button_context_quickscreen
[] = {
120 { ACTION_QS_LEFT
, BUTTON_VOL_DOWN
, BUTTON_NONE
},
121 { ACTION_QS_LEFT
, BUTTON_VOL_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
122 { ACTION_QS_RIGHT
, BUTTON_VOL_UP
, BUTTON_NONE
},
123 { ACTION_QS_RIGHT
, BUTTON_VOL_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
124 { ACTION_QS_DOWN
, BUTTON_NEXT
, BUTTON_NONE
},
125 { ACTION_QS_DOWN
, BUTTON_NEXT
|BUTTON_REPEAT
, BUTTON_NONE
},
126 { ACTION_QS_TOP
, BUTTON_PREV
, BUTTON_NONE
},
127 { ACTION_QS_TOP
, BUTTON_PREV
|BUTTON_REPEAT
, BUTTON_NONE
},
129 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
130 }; /* button_context_quickscreen */
132 static const struct button_mapping button_context_pitchscreen
[] = {
133 { ACTION_PS_INC_SMALL
, BUTTON_VOL_UP
, BUTTON_NONE
},
134 { ACTION_PS_INC_BIG
, BUTTON_VOL_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
135 { ACTION_PS_DEC_SMALL
, BUTTON_VOL_DOWN
, BUTTON_NONE
},
136 { ACTION_PS_DEC_BIG
, BUTTON_VOL_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
137 { ACTION_PS_NUDGE_LEFT
, BUTTON_PREV
, BUTTON_NONE
},
138 { ACTION_PS_NUDGE_RIGHT
, BUTTON_NEXT
, BUTTON_NONE
},
139 { ACTION_PS_NUDGE_LEFTOFF
, BUTTON_PREV
|BUTTON_REL
, BUTTON_NONE
},
140 { ACTION_PS_NUDGE_RIGHTOFF
, BUTTON_NEXT
|BUTTON_REL
, BUTTON_NONE
},
141 { ACTION_PS_TOGGLE_MODE
, BUTTON_PLAY
, BUTTON_NONE
},
142 { ACTION_PS_RESET
, BUTTON_SELECT
, BUTTON_NONE
},
143 { ACTION_PS_EXIT
, BUTTON_REC
, BUTTON_NONE
},
144 { ACTION_PS_SLOWER
, BUTTON_PREV
|BUTTON_REPEAT
, BUTTON_NONE
},
145 { ACTION_PS_FASTER
, BUTTON_NEXT
|BUTTON_REPEAT
, BUTTON_NONE
},
147 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
148 }; /* button_context_pitchscreen */
150 static const struct button_mapping button_context_radio
[] = {
151 { ACTION_FM_MENU
, BUTTON_SELECT
|BUTTON_REPEAT
, BUTTON_NONE
},
152 { ACTION_FM_PRESET
, BUTTON_SELECT
|BUTTON_REL
, BUTTON_SELECT
},
153 /* { ACTION_FM_RECORD, BUTTON_, BUTTON_ }, */
154 /* { ACTION_FM_FREEZE, BUTTON_, BUTTON_ }, */
155 { ACTION_FM_STOP
, BUTTON_PLAY
|BUTTON_REPEAT
, BUTTON_PLAY
},
156 { ACTION_FM_MODE
, BUTTON_SELECT
, BUTTON_NONE
},
157 { ACTION_FM_EXIT
, BUTTON_REC
|BUTTON_REL
, BUTTON_REC
},
158 { ACTION_FM_PLAY
, BUTTON_PLAY
|BUTTON_REL
, BUTTON_PLAY
},
159 /* { ACTION_FM_RECORD_DBLPRE, BUTTON_, BUTTON_ }, */
160 /* { ACTION_FM_NEXT_PRESET, BUTTON_, BUTTON_ }, */
161 /* { ACTION_FM_PREV_PRESET, BUTTON_, BUTTON_ }, */
163 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS
)
164 }; /* button_context_radio */
166 static const struct button_mapping button_context_recscreen
[] = {
167 /* { ACTION_REC_LCD, BUTTON_, BUTTON_ }, */
168 { ACTION_REC_PAUSE
, BUTTON_PLAY
, BUTTON_NONE
},
169 { ACTION_REC_NEWFILE
, BUTTON_SELECT
|BUTTON_REPEAT
, BUTTON_SELECT
},
170 /* { ACTION_REC_F2, BUTTON_, BUTTON_ }, */
171 /* { ACTION_REC_F3, BUTTON_, BUTTON_ }, */
173 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS
)
174 }; /* button_context_recscreen */
176 static const struct button_mapping button_context_keyboard
[] = {
177 { ACTION_KBD_LEFT
, BUTTON_VOL_DOWN
, BUTTON_NONE
},
178 { ACTION_KBD_LEFT
, BUTTON_VOL_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
179 { ACTION_KBD_RIGHT
, BUTTON_VOL_UP
, BUTTON_NONE
},
180 { ACTION_KBD_RIGHT
, BUTTON_VOL_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
181 /* { ACTION_KBD_CURSOR_LEFT, BUTTON_, BUTTON_ }, */
182 /* { ACTION_KBD_CURSOR_RIGHT, BUTTON_, BUTTON_ }, */
183 { ACTION_KBD_SELECT
, BUTTON_SELECT
, BUTTON_NONE
},
184 { ACTION_KBD_PAGE_FLIP
, BUTTON_PLAY
|BUTTON_REPEAT
, BUTTON_PLAY
},
185 { ACTION_KBD_DONE
, BUTTON_PLAY
|BUTTON_REL
, BUTTON_PLAY
},
186 { ACTION_KBD_ABORT
, BUTTON_REC
|BUTTON_REL
, BUTTON_REC
},
187 /* { ACTION_KBD_BACKSPACE, BUTTON_, BUTTON_ }, */
188 { ACTION_KBD_UP
, BUTTON_PREV
, BUTTON_NONE
},
189 { ACTION_KBD_UP
, BUTTON_PREV
|BUTTON_REPEAT
, BUTTON_NONE
},
190 { ACTION_KBD_DOWN
, BUTTON_NEXT
, BUTTON_NONE
},
191 { ACTION_KBD_DOWN
, BUTTON_NEXT
|BUTTON_REPEAT
, BUTTON_NONE
},
192 { ACTION_KBD_MORSE_INPUT
, BUTTON_REC
|BUTTON_REPEAT
, BUTTON_REC
},
193 { ACTION_KBD_MORSE_SELECT
, BUTTON_SELECT
|BUTTON_REL
, BUTTON_NONE
},
196 }; /* button_context_keyboard */
198 /*****************************************************************************
199 * Remote control mappings
200 *****************************************************************************/
202 static const struct button_mapping button_rc_context_standard
[] = {
203 { ACTION_STD_PREV
, BUTTON_RC_PREV
, BUTTON_NONE
},
204 { ACTION_STD_PREVREPEAT
, BUTTON_RC_PREV
|BUTTON_REPEAT
, BUTTON_NONE
},
205 { ACTION_STD_NEXT
, BUTTON_RC_NEXT
, BUTTON_NONE
},
206 { ACTION_STD_NEXTREPEAT
, BUTTON_RC_NEXT
|BUTTON_REPEAT
, BUTTON_NONE
},
207 { ACTION_STD_OK
, BUTTON_RC_SELECT
|BUTTON_REL
, BUTTON_RC_SELECT
},
208 { ACTION_STD_CANCEL
, BUTTON_RC_PLAY
|BUTTON_RC_SELECT
, BUTTON_RC_SELECT
},
209 { ACTION_STD_CONTEXT
, BUTTON_RC_SELECT
|BUTTON_REPEAT
, BUTTON_RC_SELECT
},
210 { ACTION_STD_MENU
, BUTTON_RC_SELECT
|BUTTON_RC_PLAY
, BUTTON_RC_SELECT
},
211 /* { ACTION_STD_QUICKSCREEN, BUTTON_, BUTTON_ }, */
212 /* { ACTION_STD_KEYLOCK, BUTTON_, BUTTON_ }, */
213 /* { ACTION_STD_REC, BUTTON_, BUTTON_ }, */
214 /* { ACTION_STD_HOTKEY, BUTTON_, BUTTON_ }, */
215 /* { ACTION_F3, BUTTON_, BUTTON_ }, */
218 }; /* button_context_standard */
220 static const struct button_mapping button_rc_context_tree
[] = {
221 /* { ACTION_TREE_ROOT_INIT, BUTTON_, BUTTON_ }, */
222 /* { ACTION_TREE_PGLEFT, BUTTON_, BUTTON_ }, */
223 /* { ACTION_TREE_PGRIGHT, BUTTON_, BUTTON_ }, */
224 { ACTION_TREE_STOP
, BUTTON_RC_PLAY
|BUTTON_REPEAT
, BUTTON_RC_PLAY
},
225 { ACTION_TREE_WPS
, BUTTON_RC_PLAY
|BUTTON_REL
, BUTTON_RC_PLAY
},
226 /* { ACTION_TREE_HOTKEY, BUTTON_, BUTTON_ }, */
228 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
229 }; /* button_context_tree */
231 static const struct button_mapping button_rc_context_wps
[] = {
232 { ACTION_WPS_BROWSE
, BUTTON_RC_SELECT
|BUTTON_REL
, BUTTON_RC_SELECT
},
233 { ACTION_WPS_PLAY
, BUTTON_RC_PLAY
|BUTTON_REL
, BUTTON_RC_PLAY
},
234 { ACTION_WPS_SEEKBACK
, BUTTON_RC_PREV
|BUTTON_REPEAT
, BUTTON_NONE
},
235 { ACTION_WPS_SEEKFWD
, BUTTON_RC_NEXT
|BUTTON_REPEAT
, BUTTON_NONE
},
236 { ACTION_WPS_STOPSEEK
, BUTTON_RC_PREV
|BUTTON_REL
, BUTTON_RC_PREV
|BUTTON_REPEAT
},
237 { ACTION_WPS_STOPSEEK
, BUTTON_RC_NEXT
|BUTTON_REL
, BUTTON_RC_NEXT
|BUTTON_REPEAT
},
238 { ACTION_WPS_SKIPNEXT
, BUTTON_RC_NEXT
|BUTTON_REL
, BUTTON_RC_NEXT
},
239 { ACTION_WPS_SKIPPREV
, BUTTON_RC_PREV
|BUTTON_REL
, BUTTON_RC_PREV
},
240 { ACTION_WPS_STOP
, BUTTON_RC_PLAY
|BUTTON_REPEAT
, BUTTON_RC_PLAY
},
241 { ACTION_WPS_VOLDOWN
, BUTTON_RC_VOL_DOWN
, BUTTON_NONE
},
242 { ACTION_WPS_VOLDOWN
, BUTTON_RC_VOL_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
243 { ACTION_WPS_VOLUP
, BUTTON_RC_VOL_UP
, BUTTON_NONE
},
244 { ACTION_WPS_VOLUP
, BUTTON_RC_VOL_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
245 /* { ACTION_WPS_PITCHSCREEN, BUTTON_, BUTTON_ }, */
246 /* { ACTION_WPS_ID3SCREEN, BUTTON_, BUTTON_ }, */
247 { ACTION_WPS_CONTEXT
, BUTTON_RC_SELECT
|BUTTON_REPEAT
, BUTTON_RC_SELECT
},
248 /* { ACTION_WPS_QUICKSCREEN, BUTTON_REC|BUTTON_REL, BUTTON_REC }, */
249 { ACTION_WPS_MENU
, BUTTON_RC_SELECT
|BUTTON_RC_PLAY
, BUTTON_RC_SELECT
},
250 /* { ACTION_WPS_VIEW_PLAYLIST, BUTTON_, BUTTON_ }, */
251 /* { ACTION_WPS_REC, BUTTON_, BUTTON_ }, */
252 /* { ACTION_WPS_ABSETA_PREVDIR, BUTTON_, BUTTON_ }, */
253 /* { ACTION_WPS_ABSETB_NEXTDIR, BUTTON_, BUTTON_ }, */
254 /* { ACTION_WPS_ABRESET, BUTTON_, BUTTON_ }, */
255 /* { ACTION_WPS_HOTKEY, BUTTON_, BUTTON_ }, */
258 }; /* button_context_wps */
260 static const struct button_mapping button_rc_context_settings
[] = {
261 { ACTION_SETTINGS_INC
, BUTTON_RC_VOL_UP
, BUTTON_NONE
},
262 { ACTION_SETTINGS_INCREPEAT
, BUTTON_RC_VOL_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
263 /* { ACTION_SETTINGS_INCBIGSTEP,BUTTON_, BUTTON_ }, */
264 { ACTION_SETTINGS_DEC
, BUTTON_RC_VOL_DOWN
, BUTTON_NONE
},
265 { ACTION_SETTINGS_DECREPEAT
, BUTTON_RC_VOL_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
266 /* { ACTION_SETTINGS_DECBIGSTEP,BUTTON_, BUTTON_ }, */
268 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD
)
269 }; /* button_context_settings */
271 static const struct button_mapping button_rc_context_yesno
[] = {
272 { ACTION_YESNO_ACCEPT
, BUTTON_RC_SELECT
, BUTTON_NONE
},
273 { ACTION_YESNO_ACCEPT
, BUTTON_RC_PLAY
, BUTTON_NONE
},
276 }; /* button_context_yesno */
278 static const struct button_mapping button_rc_context_radio
[] = {
279 { ACTION_FM_MENU
, BUTTON_RC_SELECT
|BUTTON_REPEAT
, BUTTON_NONE
},
280 { ACTION_FM_PRESET
, BUTTON_RC_SELECT
|BUTTON_REL
, BUTTON_SELECT
},
281 /* { ACTION_FM_RECORD, BUTTON_, BUTTON_ }, */
282 /* { ACTION_FM_FREEZE, BUTTON_, BUTTON_ }, */
283 { ACTION_FM_STOP
, BUTTON_RC_PLAY
|BUTTON_REPEAT
, BUTTON_PLAY
},
284 { ACTION_FM_MODE
, BUTTON_RC_SELECT
, BUTTON_NONE
},
285 { ACTION_FM_EXIT
, BUTTON_RC_SELECT
|BUTTON_RC_PLAY
, BUTTON_RC_SELECT
},
286 { ACTION_FM_PLAY
, BUTTON_RC_PLAY
|BUTTON_REL
, BUTTON_PLAY
},
287 /* { ACTION_FM_RECORD_DBLPRE, BUTTON_, BUTTON_ }, */
288 /* { ACTION_FM_NEXT_PRESET, BUTTON_, BUTTON_ }, */
289 /* { ACTION_FM_PREV_PRESET, BUTTON_, BUTTON_ }, */
291 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS
)
292 }; /* button_context_radio */
294 static const struct button_mapping button_rc_context_recscreen
[] = {
295 /* { ACTION_REC_LCD, BUTTON_, BUTTON_ }, */
296 { ACTION_REC_PAUSE
, BUTTON_RC_PLAY
, BUTTON_NONE
},
297 { ACTION_REC_NEWFILE
, BUTTON_RC_SELECT
|BUTTON_REPEAT
, BUTTON_RC_SELECT
},
298 /* { ACTION_REC_F2, BUTTON_, BUTTON_ }, */
299 /* { ACTION_REC_F3, BUTTON_, BUTTON_ }, */
301 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS
)
302 }; /* button_context_recscreen */
304 static const struct button_mapping
* get_context_mapping_remote(int context
)
306 context
^= CONTEXT_REMOTE
;
311 return button_rc_context_standard
;
314 return button_rc_context_wps
;
318 return button_rc_context_radio
;
321 #ifdef HAVE_RECORDING
322 case CONTEXT_RECSCREEN
:
323 return button_rc_context_recscreen
;
326 case CONTEXT_YESNOSCREEN
:
327 return button_rc_context_yesno
;
329 case CONTEXT_SETTINGS
:
330 case CONTEXT_SETTINGS_EQ
:
331 return button_rc_context_settings
;
334 case CONTEXT_MAINMENU
:
335 case CONTEXT_CUSTOM
|CONTEXT_TREE
:
336 return button_rc_context_tree
;
340 return button_rc_context_standard
;
344 const struct button_mapping
* get_context_mapping(int context
)
346 if (context
&CONTEXT_REMOTE
)
347 return get_context_mapping_remote(context
);
352 return button_context_standard
;
355 return button_context_wps
;
359 return button_context_radio
;
362 #ifdef HAVE_RECORDING
363 case CONTEXT_RECSCREEN
:
364 return button_context_recscreen
;
367 case CONTEXT_YESNOSCREEN
:
368 return button_context_yesno
;
370 case CONTEXT_BOOKMARKSCREEN
:
371 return button_context_bmark
;
373 case CONTEXT_QUICKSCREEN
:
374 return button_context_quickscreen
;
376 case CONTEXT_PITCHSCREEN
:
377 return button_context_pitchscreen
;
379 case CONTEXT_KEYBOARD
:
380 case CONTEXT_MORSE_INPUT
:
381 return button_context_keyboard
;
383 case CONTEXT_SETTINGS
:
384 case CONTEXT_SETTINGS_EQ
:
385 return button_context_settings
;
388 case CONTEXT_MAINMENU
:
389 case CONTEXT_CUSTOM
|CONTEXT_TREE
:
390 return button_context_tree
;
394 return button_context_standard
;
396 return button_context_standard
;