diff options
Diffstat (limited to 'apps/keymaps/keymap-ypz5.c')
-rw-r--r-- | apps/keymaps/keymap-ypz5.c | 406 |
1 files changed, 0 insertions, 406 deletions
diff --git a/apps/keymaps/keymap-ypz5.c b/apps/keymaps/keymap-ypz5.c deleted file mode 100644 index edeebbac3f..0000000000 --- a/apps/keymaps/keymap-ypz5.c +++ /dev/null | |||
@@ -1,406 +0,0 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2013 Lorenzo Miori | ||
11 | * | ||
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. | ||
16 | * | ||
17 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
18 | * KIND, either express or implied. | ||
19 | * | ||
20 | ****************************************************************************/ | ||
21 | |||
22 | /* Button Code Definitions for the Creative Zen Vision target */ | ||
23 | /* Copied from ZVM target for now... */ | ||
24 | #include <stdio.h> | ||
25 | #include <string.h> | ||
26 | #include <stdlib.h> | ||
27 | |||
28 | #include "config.h" | ||
29 | #include "action.h" | ||
30 | #include "button.h" | ||
31 | #include "settings.h" | ||
32 | |||
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 | ||
38 | */ | ||
39 | |||
40 | /* CONTEXT_CUSTOM's used in this file... | ||
41 | |||
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 | ||
46 | |||
47 | */ | ||
48 | |||
49 | static const struct button_mapping button_context_standard[] = { | ||
50 | { ACTION_STD_PREV, BUTTON_UP|BUTTON_REL, BUTTON_NONE }, | ||
51 | { ACTION_STD_PREVREPEAT, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE }, | ||
52 | { ACTION_STD_NEXT, BUTTON_DOWN|BUTTON_REL, BUTTON_NONE }, | ||
53 | { ACTION_STD_NEXTREPEAT, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE }, | ||
54 | |||
55 | { ACTION_STD_PREV, BUTTON_FF|BUTTON_REL, BUTTON_NONE }, | ||
56 | { ACTION_STD_PREVREPEAT, BUTTON_FF|BUTTON_REPEAT, BUTTON_NONE }, | ||
57 | { ACTION_STD_NEXT, BUTTON_REW|BUTTON_REL, BUTTON_NONE }, | ||
58 | { ACTION_STD_NEXTREPEAT, BUTTON_REW|BUTTON_REPEAT, BUTTON_NONE }, | ||
59 | |||
60 | { ACTION_STD_CANCEL, BUTTON_BACK|BUTTON_REL, BUTTON_NONE }, | ||
61 | |||
62 | { ACTION_STD_CONTEXT, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_SELECT }, | ||
63 | |||
64 | //{ ACTION_STD_QUICKSCREEN, BUTTON_BACK|BUTTON_REPEAT, BUTTON_BACK }, | ||
65 | { ACTION_STD_MENU, BUTTON_BACK|BUTTON_REPEAT, BUTTON_NONE }, | ||
66 | |||
67 | { ACTION_STD_OK, BUTTON_SELECT|BUTTON_REL, BUTTON_SELECT }, | ||
68 | // { ACTION_STD_OK, BUTTON_RIGHT, BUTTON_NONE }, | ||
69 | |||
70 | LAST_ITEM_IN_LIST | ||
71 | }; /* button_context_standard */ | ||
72 | |||
73 | |||
74 | static const struct button_mapping button_context_wps[] = { | ||
75 | { ACTION_WPS_PLAY, BUTTON_POWER|BUTTON_REL, BUTTON_POWER }, | ||
76 | //{ ACTION_WPS_STOP, BUTTON_POWER|BUTTON_REPEAT, BUTTON_NONE }, | ||
77 | |||
78 | { ACTION_WPS_SKIPNEXT, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT }, | ||
79 | { ACTION_WPS_SKIPPREV, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT }, | ||
80 | |||
81 | { ACTION_WPS_SEEKBACK, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, | ||
82 | { ACTION_WPS_SEEKFWD, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, | ||
83 | { ACTION_WPS_STOPSEEK, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT|BUTTON_REPEAT }, | ||
84 | { ACTION_WPS_STOPSEEK, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT|BUTTON_REPEAT }, | ||
85 | |||
86 | { ACTION_WPS_VOLDOWN, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE }, | ||
87 | { ACTION_WPS_VOLDOWN, BUTTON_VOL_DOWN, BUTTON_NONE }, | ||
88 | { ACTION_WPS_VOLUP, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE }, | ||
89 | { ACTION_WPS_VOLUP, BUTTON_VOL_UP, BUTTON_NONE }, | ||
90 | |||
91 | //{ ACTION_WPS_PITCHSCREEN, BUTTON_BACK|BUTTON_REPEAT, BUTTON_BACK }, | ||
92 | |||
93 | { ACTION_WPS_QUICKSCREEN, BUTTON_BACK|BUTTON_REPEAT, BUTTON_BACK }, | ||
94 | { ACTION_WPS_MENU, BUTTON_BACK|BUTTON_REL, BUTTON_BACK }, | ||
95 | { ACTION_WPS_VIEW_PLAYLIST, BUTTON_POWER, BUTTON_NONE }, | ||
96 | { ACTION_WPS_CONTEXT, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_SELECT }, | ||
97 | |||
98 | { ACTION_WPS_HOTKEY, BUTTON_BACK|BUTTON_REL, BUTTON_NONE }, | ||
99 | { ACTION_WPS_BROWSE, BUTTON_SELECT|BUTTON_REL, BUTTON_BACK }, | ||
100 | LAST_ITEM_IN_LIST | ||
101 | }; /* button_context_wps */ | ||
102 | |||
103 | static const struct button_mapping button_context_list[] = { | ||
104 | #ifdef HAVE_VOLUME_IN_LIST | ||
105 | { ACTION_LIST_VOLUP, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE }, | ||
106 | { ACTION_LIST_VOLUP, BUTTON_VOL_UP, BUTTON_NONE }, | ||
107 | { ACTION_LIST_VOLDOWN, BUTTON_VOL_DOWN, BUTTON_NONE }, | ||
108 | { ACTION_LIST_VOLDOWN, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE }, | ||
109 | #endif | ||
110 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) | ||
111 | }; /* button_context_list */ | ||
112 | |||
113 | static const struct button_mapping button_context_tree[] = { | ||
114 | //{ ACTION_TREE_WPS, BUTTON_POWER|BUTTON_REL, BUTTON_POWER }, | ||
115 | //{ ACTION_TREE_STOP, BUTTON_POWER, BUTTON_NONE }, | ||
116 | //{ ACTION_TREE_STOP, BUTTON_POWER|BUTTON_REL, BUTTON_POWER }, | ||
117 | //{ ACTION_TREE_STOP, BUTTON_POWER|BUTTON_REPEAT, BUTTON_NONE }, | ||
118 | //{ ACTION_TREE_HOTKEY, BUTTON_BACK|BUTTON_REL, BUTTON_NONE }, | ||
119 | |||
120 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST) | ||
121 | }; /* button_context_tree */ | ||
122 | |||
123 | static const struct button_mapping button_context_listtree_scroll_without_combo[] = { | ||
124 | { ACTION_NONE, BUTTON_LEFT, BUTTON_NONE }, | ||
125 | { ACTION_STD_CANCEL, BUTTON_BACK|BUTTON_REL, BUTTON_BACK }, | ||
126 | { ACTION_TREE_ROOT_INIT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_LEFT }, | ||
127 | { ACTION_TREE_PGLEFT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, | ||
128 | { ACTION_NONE, BUTTON_RIGHT, BUTTON_NONE }, | ||
129 | { ACTION_STD_OK, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT }, | ||
130 | { ACTION_TREE_PGRIGHT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, | ||
131 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_TREE), | ||
132 | }; | ||
133 | |||
134 | static const struct button_mapping button_context_settings[] = { | ||
135 | { ACTION_SETTINGS_INC, BUTTON_UP, BUTTON_NONE }, | ||
136 | { ACTION_SETTINGS_INCREPEAT, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE }, | ||
137 | { ACTION_SETTINGS_DEC, BUTTON_DOWN, BUTTON_NONE }, | ||
138 | { ACTION_SETTINGS_DECREPEAT, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE }, | ||
139 | { ACTION_STD_PREV, BUTTON_LEFT, BUTTON_NONE }, | ||
140 | { ACTION_STD_PREVREPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_LEFT }, | ||
141 | { ACTION_STD_NEXT, BUTTON_RIGHT, BUTTON_NONE }, | ||
142 | { ACTION_STD_NEXTREPEAT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_RIGHT }, | ||
143 | { ACTION_SETTINGS_RESET, BUTTON_POWER, BUTTON_NONE }, | ||
144 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) | ||
145 | }; /* button_context_settings */ | ||
146 | |||
147 | static const struct button_mapping button_context_settings_right_is_inc[] = { | ||
148 | { ACTION_SETTINGS_INC, BUTTON_RIGHT, BUTTON_NONE }, | ||
149 | { ACTION_SETTINGS_INCREPEAT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, | ||
150 | { ACTION_SETTINGS_DEC, BUTTON_LEFT, BUTTON_NONE }, | ||
151 | { ACTION_SETTINGS_DECREPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, | ||
152 | { ACTION_STD_PREV, BUTTON_UP, BUTTON_NONE }, | ||
153 | { ACTION_STD_PREVREPEAT, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE }, | ||
154 | { ACTION_STD_NEXT, BUTTON_DOWN, BUTTON_NONE }, | ||
155 | { ACTION_STD_NEXTREPEAT, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE }, | ||
156 | { ACTION_SETTINGS_RESET, BUTTON_BACK, BUTTON_NONE }, | ||
157 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) | ||
158 | }; /* button_context_settingsgraphical */ | ||
159 | |||
160 | static const struct button_mapping button_context_yesno[] = { | ||
161 | { ACTION_YESNO_ACCEPT, BUTTON_SELECT, BUTTON_NONE }, | ||
162 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) | ||
163 | }; /* button_context_settings_yesno */ | ||
164 | |||
165 | static const struct button_mapping button_context_colorchooser[] = { | ||
166 | { ACTION_STD_OK, BUTTON_BACK|BUTTON_REL, BUTTON_NONE }, | ||
167 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_SETTINGS), | ||
168 | }; /* button_context_colorchooser */ | ||
169 | |||
170 | static const struct button_mapping button_context_eq[] = { | ||
171 | { ACTION_STD_OK, BUTTON_SELECT|BUTTON_REL, BUTTON_NONE }, | ||
172 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_SETTINGS), | ||
173 | }; /* button_context_eq */ | ||
174 | |||
175 | /** Bookmark Screen **/ | ||
176 | static const struct button_mapping button_context_bmark[] = { | ||
177 | { ACTION_BMS_DELETE, BUTTON_BACK, BUTTON_NONE }, | ||
178 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST), | ||
179 | }; /* button_context_bmark */ | ||
180 | |||
181 | static const struct button_mapping button_context_time[] = { | ||
182 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS), | ||
183 | }; /* button_context_time */ | ||
184 | |||
185 | static const struct button_mapping button_context_quickscreen[] = { | ||
186 | { ACTION_QS_TOP, BUTTON_UP, BUTTON_NONE }, | ||
187 | { ACTION_QS_TOP, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE }, | ||
188 | { ACTION_QS_DOWN, BUTTON_DOWN, BUTTON_NONE }, | ||
189 | { ACTION_QS_DOWN, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE }, | ||
190 | { ACTION_QS_LEFT, BUTTON_LEFT, BUTTON_NONE }, | ||
191 | { ACTION_QS_LEFT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, | ||
192 | { ACTION_QS_RIGHT, BUTTON_RIGHT, BUTTON_NONE }, | ||
193 | { ACTION_QS_RIGHT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, | ||
194 | { ACTION_STD_CANCEL, BUTTON_BACK, BUTTON_NONE }, | ||
195 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) | ||
196 | }; /* button_context_quickscreen */ | ||
197 | |||
198 | static const struct button_mapping button_context_pitchscreen[] = { | ||
199 | |||
200 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) | ||
201 | }; /* button_context_pitchcreen */ | ||
202 | |||
203 | static const struct button_mapping button_context_keyboard[] = { | ||
204 | { ACTION_KBD_LEFT, BUTTON_LEFT, BUTTON_NONE }, | ||
205 | { ACTION_KBD_LEFT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, | ||
206 | { ACTION_KBD_RIGHT, BUTTON_RIGHT, BUTTON_NONE }, | ||
207 | { ACTION_KBD_RIGHT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, | ||
208 | { ACTION_KBD_CURSOR_RIGHT, BUTTON_POWER, BUTTON_NONE }, | ||
209 | { ACTION_KBD_CURSOR_RIGHT, BUTTON_POWER|BUTTON_REPEAT, BUTTON_NONE }, | ||
210 | { ACTION_KBD_SELECT, BUTTON_SELECT, BUTTON_NONE }, | ||
211 | { ACTION_KBD_PAGE_FLIP, BUTTON_BACK|BUTTON_BACK, BUTTON_NONE }, | ||
212 | { ACTION_KBD_DONE, BUTTON_POWER|BUTTON_REL, BUTTON_POWER }, | ||
213 | { ACTION_KBD_ABORT, BUTTON_BACK|BUTTON_REL, BUTTON_BACK }, | ||
214 | { ACTION_KBD_BACKSPACE, BUTTON_BACK, BUTTON_NONE }, | ||
215 | { ACTION_KBD_BACKSPACE, BUTTON_BACK|BUTTON_REPEAT, BUTTON_NONE }, | ||
216 | { ACTION_KBD_UP, BUTTON_UP, BUTTON_NONE }, | ||
217 | { ACTION_KBD_UP, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE }, | ||
218 | { ACTION_KBD_DOWN, BUTTON_DOWN, BUTTON_NONE }, | ||
219 | { ACTION_KBD_DOWN, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE }, | ||
220 | { ACTION_KBD_MORSE_SELECT, BUTTON_SELECT|BUTTON_REL, BUTTON_NONE }, | ||
221 | LAST_ITEM_IN_LIST | ||
222 | }; /* button_context_keyboard */ | ||
223 | |||
224 | /** FM Radio Screen **/ | ||
225 | #if CONFIG_TUNER | ||
226 | static const struct button_mapping button_context_radio[] = { | ||
227 | { ACTION_FM_MENU, BUTTON_SELECT | BUTTON_REPEAT, BUTTON_SELECT }, | ||
228 | { ACTION_FM_MODE, BUTTON_SELECT, BUTTON_SELECT }, | ||
229 | // { ACTION_FM_PRESET, BUTTON_STOP, BUTTON_NONE }, | ||
230 | { ACTION_FM_PLAY, BUTTON_POWER | BUTTON_REL, BUTTON_NONE }, | ||
231 | { ACTION_FM_STOP, BUTTON_POWER | BUTTON_REPEAT, BUTTON_NONE }, | ||
232 | { ACTION_FM_EXIT, BUTTON_BACK, BUTTON_NONE }, | ||
233 | |||
234 | //{ ACTION_SETTINGS_INC, BUTTON_VOL_UP, BUTTON_NONE }, | ||
235 | //{ ACTION_SETTINGS_INCREPEAT,BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE }, | ||
236 | //{ ACTION_SETTINGS_DEC, BUTTON_VOL_DOWN, BUTTON_NONE }, | ||
237 | //{ ACTION_SETTINGS_DECREPEAT,BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE }, | ||
238 | |||
239 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS) | ||
240 | }; /* button_context_radio */ | ||
241 | #endif | ||
242 | |||
243 | #ifdef HAVE_RECORDING | ||
244 | static const struct button_mapping button_context_recscreen[] = { | ||
245 | |||
246 | { ACTION_REC_PAUSE, BUTTON_SELECT, BUTTON_NONE }, | ||
247 | { ACTION_SETTINGS_INC, BUTTON_RIGHT, BUTTON_NONE }, | ||
248 | { ACTION_SETTINGS_INCREPEAT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, | ||
249 | { ACTION_SETTINGS_DEC, BUTTON_LEFT, BUTTON_NONE }, | ||
250 | { ACTION_SETTINGS_DECREPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, | ||
251 | |||
252 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) | ||
253 | }; /* button_context_recscreen */ | ||
254 | #endif | ||
255 | |||
256 | #ifdef USB_ENABLE_HID | ||
257 | static const struct button_mapping button_context_usb_hid[] = { | ||
258 | { ACTION_USB_HID_MODE_SWITCH_NEXT, BUTTON_BACK|BUTTON_REL, BUTTON_BACK }, | ||
259 | { ACTION_USB_HID_MODE_SWITCH_PREV, BUTTON_BACK|BUTTON_REPEAT, BUTTON_BACK }, | ||
260 | |||
261 | LAST_ITEM_IN_LIST | ||
262 | }; /* button_context_usb_hid */ | ||
263 | |||
264 | static const struct button_mapping button_context_usb_hid_mode_multimedia[] = { | ||
265 | |||
266 | { ACTION_USB_HID_MULTIMEDIA_VOLUME_DOWN, BUTTON_VOL_DOWN, BUTTON_NONE }, | ||
267 | { ACTION_USB_HID_MULTIMEDIA_VOLUME_DOWN, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE }, | ||
268 | { ACTION_USB_HID_MULTIMEDIA_VOLUME_UP, BUTTON_VOL_UP, BUTTON_NONE }, | ||
269 | { ACTION_USB_HID_MULTIMEDIA_VOLUME_UP, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE }, | ||
270 | { ACTION_USB_HID_MULTIMEDIA_VOLUME_MUTE, BUTTON_SELECT|BUTTON_REL, BUTTON_SELECT }, | ||
271 | { ACTION_USB_HID_MULTIMEDIA_PLAYBACK_PLAY_PAUSE, BUTTON_POWER|BUTTON_REL, BUTTON_POWER }, | ||
272 | { ACTION_USB_HID_MULTIMEDIA_PLAYBACK_STOP, BUTTON_POWER|BUTTON_REPEAT, BUTTON_POWER }, | ||
273 | { ACTION_USB_HID_MULTIMEDIA_PLAYBACK_TRACK_PREV, BUTTON_REW|BUTTON_REL, BUTTON_REW }, | ||
274 | { ACTION_USB_HID_MULTIMEDIA_PLAYBACK_TRACK_NEXT, BUTTON_FF|BUTTON_REL, BUTTON_FF }, | ||
275 | |||
276 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_USB_HID) | ||
277 | }; /* button_context_usb_hid_mode_multimedia */ | ||
278 | |||
279 | |||
280 | static const struct button_mapping button_context_usb_hid_mode_presentation[] = { | ||
281 | { ACTION_USB_HID_PRESENTATION_SLIDESHOW_START, BUTTON_POWER|BUTTON_REL, BUTTON_POWER }, | ||
282 | { ACTION_USB_HID_PRESENTATION_SLIDESHOW_LEAVE, BUTTON_POWER|BUTTON_REPEAT, BUTTON_POWER }, | ||
283 | { ACTION_USB_HID_PRESENTATION_SLIDE_PREV, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT }, | ||
284 | { ACTION_USB_HID_PRESENTATION_SLIDE_NEXT, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT }, | ||
285 | { ACTION_USB_HID_PRESENTATION_SLIDE_FIRST, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, | ||
286 | { ACTION_USB_HID_PRESENTATION_SLIDE_LAST, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, | ||
287 | //{ ACTION_USB_HID_PRESENTATION_SCREEN_BLACK, BUTTON_BOTTOMRIGHT|BUTTON_REPEAT, BUTTON_BOTTOMRIGHT }, | ||
288 | //{ ACTION_USB_HID_PRESENTATION_SCREEN_WHITE, BUTTON_BOTTOMLEFT|BUTTON_REPEAT, BUTTON_BOTTOMLEFT }, | ||
289 | { ACTION_USB_HID_PRESENTATION_LINK_PREV, BUTTON_UP, BUTTON_NONE }, | ||
290 | { ACTION_USB_HID_PRESENTATION_LINK_PREV, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE }, | ||
291 | { ACTION_USB_HID_PRESENTATION_LINK_NEXT, BUTTON_DOWN, BUTTON_NONE }, | ||
292 | { ACTION_USB_HID_PRESENTATION_LINK_NEXT, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE }, | ||
293 | { ACTION_USB_HID_PRESENTATION_MOUSE_CLICK, BUTTON_SELECT, BUTTON_SELECT }, | ||
294 | { ACTION_USB_HID_PRESENTATION_MOUSE_OVER, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_SELECT }, | ||
295 | |||
296 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_USB_HID) | ||
297 | }; /* button_context_usb_hid_mode_presentation */ | ||
298 | |||
299 | static const struct button_mapping button_context_usb_hid_mode_browser[] = { | ||
300 | { ACTION_USB_HID_BROWSER_SCROLL_UP, BUTTON_UP, BUTTON_NONE }, | ||
301 | { ACTION_USB_HID_BROWSER_SCROLL_UP, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE }, | ||
302 | { ACTION_USB_HID_BROWSER_SCROLL_DOWN, BUTTON_DOWN, BUTTON_NONE }, | ||
303 | { ACTION_USB_HID_BROWSER_SCROLL_DOWN, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE }, | ||
304 | { ACTION_USB_HID_BROWSER_ZOOM_IN, BUTTON_VOL_UP, BUTTON_NONE }, | ||
305 | { ACTION_USB_HID_BROWSER_ZOOM_IN, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE }, | ||
306 | { ACTION_USB_HID_BROWSER_ZOOM_OUT, BUTTON_VOL_DOWN, BUTTON_NONE }, | ||
307 | { ACTION_USB_HID_BROWSER_ZOOM_OUT, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE }, | ||
308 | { ACTION_USB_HID_BROWSER_ZOOM_RESET, BUTTON_POWER|BUTTON_REPEAT, BUTTON_NONE }, | ||
309 | { ACTION_USB_HID_BROWSER_TAB_PREV, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT }, | ||
310 | { ACTION_USB_HID_BROWSER_TAB_NEXT, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT }, | ||
311 | { ACTION_USB_HID_BROWSER_TAB_CLOSE, BUTTON_BACK|BUTTON_REPEAT, BUTTON_BACK }, | ||
312 | { ACTION_USB_HID_BROWSER_HISTORY_BACK, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_LEFT }, | ||
313 | { ACTION_USB_HID_BROWSER_HISTORY_FORWARD, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_RIGHT }, | ||
314 | { ACTION_USB_HID_BROWSER_VIEW_FULL_SCREEN, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_SELECT }, | ||
315 | |||
316 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_USB_HID) | ||
317 | }; /* button_context_usb_hid_mode_browser */ | ||
318 | |||
319 | #ifdef HAVE_USB_HID_MOUSE | ||
320 | static const struct button_mapping button_context_usb_hid_mode_mouse[] = { | ||
321 | { ACTION_USB_HID_MOUSE_UP, BUTTON_UP, BUTTON_NONE }, | ||
322 | { ACTION_USB_HID_MOUSE_UP_REP, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE }, | ||
323 | { ACTION_USB_HID_MOUSE_DOWN, BUTTON_DOWN, BUTTON_NONE }, | ||
324 | { ACTION_USB_HID_MOUSE_DOWN_REP, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE }, | ||
325 | { ACTION_USB_HID_MOUSE_LEFT, BUTTON_LEFT, BUTTON_NONE }, | ||
326 | { ACTION_USB_HID_MOUSE_LEFT_REP, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, | ||
327 | { ACTION_USB_HID_MOUSE_RIGHT, BUTTON_RIGHT, BUTTON_NONE }, | ||
328 | { ACTION_USB_HID_MOUSE_RIGHT_REP, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, | ||
329 | { ACTION_USB_HID_MOUSE_BUTTON_LEFT, BUTTON_SELECT, BUTTON_NONE }, | ||
330 | { ACTION_USB_HID_MOUSE_BUTTON_LEFT_REL, BUTTON_SELECT|BUTTON_REL, BUTTON_NONE }, | ||
331 | { ACTION_USB_HID_MOUSE_BUTTON_RIGHT, BUTTON_POWER, BUTTON_NONE }, | ||
332 | { ACTION_USB_HID_MOUSE_BUTTON_RIGHT_REL, BUTTON_POWER|BUTTON_REL, BUTTON_POWER }, | ||
333 | |||
334 | { ACTION_USB_HID_MOUSE_WHEEL_SCROLL_UP, BUTTON_FF, BUTTON_NONE }, | ||
335 | { ACTION_USB_HID_MOUSE_WHEEL_SCROLL_UP, BUTTON_FF|BUTTON_REPEAT, BUTTON_NONE }, | ||
336 | { ACTION_USB_HID_MOUSE_WHEEL_SCROLL_DOWN, BUTTON_REW, BUTTON_NONE }, | ||
337 | { ACTION_USB_HID_MOUSE_WHEEL_SCROLL_DOWN, BUTTON_REW|BUTTON_REPEAT, BUTTON_NONE }, | ||
338 | |||
339 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_USB_HID) | ||
340 | }; /* button_context_usb_hid_mode_mouse */ | ||
341 | #endif | ||
342 | #endif | ||
343 | |||
344 | const struct button_mapping* get_context_mapping(int context) | ||
345 | { | ||
346 | switch (context) | ||
347 | { | ||
348 | case CONTEXT_STD: | ||
349 | return button_context_standard; | ||
350 | case CONTEXT_WPS: | ||
351 | return button_context_wps; | ||
352 | case CONTEXT_LIST: | ||
353 | return button_context_list; | ||
354 | case CONTEXT_MAINMENU: | ||
355 | case CONTEXT_TREE: | ||
356 | return button_context_listtree_scroll_without_combo; | ||
357 | case CONTEXT_CUSTOM|CONTEXT_TREE: | ||
358 | return button_context_tree; | ||
359 | #if CONFIG_TUNER | ||
360 | case CONTEXT_FM: | ||
361 | return button_context_radio; | ||
362 | #endif | ||
363 | case CONTEXT_SETTINGS: | ||
364 | return button_context_settings; | ||
365 | case CONTEXT_CUSTOM|CONTEXT_SETTINGS: | ||
366 | return button_context_settings_right_is_inc; | ||
367 | case CONTEXT_SETTINGS_COLOURCHOOSER: | ||
368 | return button_context_colorchooser; | ||
369 | case CONTEXT_SETTINGS_EQ: | ||
370 | return button_context_eq; | ||
371 | case CONTEXT_SETTINGS_TIME: | ||
372 | 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; | ||
384 | #ifdef HAVE_RECORDING | ||
385 | case CONTEXT_SETTINGS_RECTRIGGER: | ||
386 | return button_context_settings_right_is_inc; | ||
387 | case CONTEXT_RECSCREEN: | ||
388 | return button_context_recscreen; | ||
389 | #endif | ||
390 | #ifdef USB_ENABLE_HID | ||
391 | case CONTEXT_USB_HID: | ||
392 | return button_context_usb_hid; | ||
393 | case CONTEXT_USB_HID_MODE_MULTIMEDIA: | ||
394 | return button_context_usb_hid_mode_multimedia; | ||
395 | case CONTEXT_USB_HID_MODE_PRESENTATION: | ||
396 | return button_context_usb_hid_mode_presentation; | ||
397 | case CONTEXT_USB_HID_MODE_BROWSER: | ||
398 | return button_context_usb_hid_mode_browser; | ||
399 | #ifdef HAVE_USB_HID_MOUSE | ||
400 | case CONTEXT_USB_HID_MODE_MOUSE: | ||
401 | return button_context_usb_hid_mode_mouse; | ||
402 | #endif | ||
403 | #endif | ||
404 | } | ||
405 | return button_context_standard; | ||
406 | } | ||