summaryrefslogtreecommitdiff
path: root/apps/keymaps/keymap-ondio.c
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2020-07-15 19:40:55 -0400
committerSolomon Peachy <pizza@shaftnet.org>2020-07-24 21:20:13 +0000
commit092c340a2062fa98b7387fc5fd63578ddae7d0b6 (patch)
tree98ec96946eeb2ae709cb0528cc6998e21bb9b290 /apps/keymaps/keymap-ondio.c
parent17f7cc92c258bc456a27c3e7c5a19c9409851879 (diff)
downloadrockbox-092c340a2062fa98b7387fc5fd63578ddae7d0b6.tar.gz
rockbox-092c340a2062fa98b7387fc5fd63578ddae7d0b6.zip
[1/4] Remove SH support and all archos targets
This removes all code specific to SH targets Change-Id: I7980523785d2596e65c06430f4638eec74a06061
Diffstat (limited to 'apps/keymaps/keymap-ondio.c')
-rw-r--r--apps/keymaps/keymap-ondio.c252
1 files changed, 0 insertions, 252 deletions
diff --git a/apps/keymaps/keymap-ondio.c b/apps/keymaps/keymap-ondio.c
deleted file mode 100644
index 3a6f667601..0000000000
--- a/apps/keymaps/keymap-ondio.c
+++ /dev/null
@@ -1,252 +0,0 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2006 Jonathan Gordon
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/* *
23 * Button Code Definitions for archos ondio fm/sp targets
24 */
25
26#include "config.h"
27#include "action.h"
28#include "button.h"
29#include "settings.h"
30
31/* CONTEXT_CUSTOM's used in this file...
32
33CONTEXT_CUSTOM|CONTEXT_TREE = the standard list/tree defines (without directions)
34
35
36*/
37
38static const struct button_mapping button_context_standard[] = {
39 { ACTION_STD_PREV, BUTTON_UP, BUTTON_NONE },
40 { ACTION_STD_PREVREPEAT, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
41 { ACTION_STD_NEXT, BUTTON_DOWN, BUTTON_NONE },
42 { ACTION_STD_NEXTREPEAT, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
43
44 { ACTION_STD_CONTEXT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_RIGHT },
45 { ACTION_STD_CANCEL, BUTTON_LEFT, BUTTON_NONE },
46 { ACTION_STD_OK, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT },
47 { ACTION_STD_MENU, BUTTON_MENU|BUTTON_REPEAT, BUTTON_MENU },
48 { ACTION_STD_CANCEL, BUTTON_OFF, BUTTON_NONE },
49
50 LAST_ITEM_IN_LIST
51};
52
53static const struct button_mapping button_context_wps[] = {
54 { ACTION_WPS_PLAY, BUTTON_OFF|BUTTON_REL, BUTTON_OFF },
55 { ACTION_WPS_SKIPNEXT, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT },
56 { ACTION_WPS_SKIPPREV, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT },
57 { ACTION_WPS_SEEKBACK, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
58 { ACTION_WPS_SEEKFWD, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
59 { ACTION_WPS_STOPSEEK, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT|BUTTON_REPEAT },
60 { ACTION_WPS_STOPSEEK, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT|BUTTON_REPEAT },
61 { ACTION_WPS_STOP, BUTTON_OFF|BUTTON_REPEAT, BUTTON_OFF },
62 { ACTION_WPS_VOLDOWN, BUTTON_DOWN, BUTTON_NONE },
63 { ACTION_WPS_VOLDOWN, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
64 { ACTION_WPS_VOLUP, BUTTON_UP, BUTTON_NONE },
65 { ACTION_WPS_VOLUP, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
66 { ACTION_WPS_BROWSE, BUTTON_MENU|BUTTON_REL, BUTTON_MENU },
67 { ACTION_WPS_CONTEXT, BUTTON_MENU|BUTTON_REPEAT, BUTTON_MENU },
68 /* { ACTION_WPS_MENU, BUTTON_NONE, BUTTON_NONE }, we can't have that */
69 { ACTION_STD_KEYLOCK, BUTTON_MENU|BUTTON_DOWN, BUTTON_NONE },
70 /* { ACTION_WPS_VIEW_PLAYLIST,BUTTON_NONE, BUTTON_NONE }, can't have this either */
71
72 LAST_ITEM_IN_LIST
73};
74
75static const struct button_mapping button_context_settings[] = {
76 { ACTION_SETTINGS_INC, BUTTON_UP, BUTTON_NONE },
77 { ACTION_SETTINGS_INCREPEAT, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
78 { ACTION_SETTINGS_DEC, BUTTON_DOWN, BUTTON_NONE },
79 { ACTION_SETTINGS_DECREPEAT, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
80 { ACTION_STD_OK, BUTTON_RIGHT, BUTTON_NONE },
81 { ACTION_STD_OK, BUTTON_LEFT, BUTTON_NONE },
82 { ACTION_STD_CANCEL, BUTTON_MENU, BUTTON_NONE },
83
84 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
85};
86
87static const struct button_mapping button_context_tree[] = {
88 { ACTION_TREE_WPS, BUTTON_MENU|BUTTON_REL, BUTTON_MENU },
89 { ACTION_TREE_STOP, BUTTON_OFF, BUTTON_NONE },
90 { ACTION_STD_CANCEL, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
91
92 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
93}; /* button_context_listtree */
94
95static const struct button_mapping button_context_tree_scroll_lr[] = {
96 { ACTION_NONE, BUTTON_LEFT, BUTTON_NONE },
97 { ACTION_STD_CANCEL, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT },
98 { ACTION_TREE_PGLEFT, BUTTON_MENU|BUTTON_LEFT, BUTTON_NONE },
99 { ACTION_TREE_ROOT_INIT, BUTTON_MENU|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_MENU|BUTTON_LEFT },
100 { ACTION_TREE_PGLEFT, BUTTON_MENU|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
101 { ACTION_NONE, BUTTON_RIGHT, BUTTON_NONE },
102 { ACTION_STD_OK, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT },
103 { ACTION_TREE_PGRIGHT, BUTTON_MENU|BUTTON_RIGHT, BUTTON_NONE },
104 { ACTION_TREE_PGRIGHT, BUTTON_MENU|BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
105
106 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_TREE),
107};
108
109static const struct button_mapping button_context_yesno[] = {
110 { ACTION_YESNO_ACCEPT, BUTTON_RIGHT, BUTTON_NONE },
111
112 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
113};
114
115static const struct button_mapping button_context_bmark[] = {
116 { ACTION_NONE, BUTTON_LEFT, BUTTON_NONE },
117 { ACTION_BMS_DELETE, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_LEFT },
118
119 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST),
120}; /* button_context_settings_bmark */
121
122static const struct button_mapping button_context_pitchscreen[] = {
123 { ACTION_PS_INC_SMALL, BUTTON_UP, BUTTON_NONE },
124 { ACTION_PS_INC_BIG, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
125 { ACTION_PS_DEC_SMALL, BUTTON_DOWN, BUTTON_NONE },
126 { ACTION_PS_DEC_BIG, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
127 { ACTION_PS_NUDGE_LEFT, BUTTON_LEFT, BUTTON_NONE },
128 { ACTION_PS_NUDGE_LEFTOFF, BUTTON_LEFT|BUTTON_REL, BUTTON_NONE },
129 { ACTION_PS_NUDGE_RIGHT, BUTTON_RIGHT, BUTTON_NONE },
130 { ACTION_PS_NUDGE_RIGHTOFF, BUTTON_RIGHT|BUTTON_REL, BUTTON_NONE },
131 { ACTION_PS_TOGGLE_MODE, BUTTON_MENU|BUTTON_REPEAT, BUTTON_MENU },
132 { ACTION_PS_RESET, BUTTON_MENU, BUTTON_NONE },
133 { ACTION_PS_EXIT, BUTTON_OFF, BUTTON_NONE },
134
135 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
136}; /* button_context_pitchscreen */
137
138#ifdef HAVE_RECORDING
139static const struct button_mapping button_context_rectrigger[] = {
140 { ACTION_STD_OK, BUTTON_MENU|BUTTON_REL, BUTTON_MENU },
141 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_RECSCREEN)
142};
143static const struct button_mapping button_context_recscreen[] = {
144 { ACTION_REC_PAUSE, BUTTON_MENU|BUTTON_REL, BUTTON_MENU },
145 { ACTION_SETTINGS_INC, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT },
146 { ACTION_SETTINGS_INCREPEAT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
147 { ACTION_SETTINGS_DEC, BUTTON_LEFT, BUTTON_NONE },
148 { ACTION_SETTINGS_DECREPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
149
150 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
151}; /* button_context_recscreen */
152#endif /* HAVE_RECORDING */
153
154static const struct button_mapping button_context_keyboard[] = {
155 { ACTION_KBD_LEFT, BUTTON_LEFT, BUTTON_NONE },
156 { ACTION_KBD_LEFT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
157 { ACTION_KBD_RIGHT, BUTTON_RIGHT, BUTTON_NONE },
158 { ACTION_KBD_RIGHT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
159 { ACTION_KBD_SELECT, BUTTON_MENU|BUTTON_REL, BUTTON_MENU },
160 { ACTION_KBD_DONE, BUTTON_MENU|BUTTON_REPEAT, BUTTON_NONE },
161 { ACTION_KBD_ABORT, BUTTON_OFF, BUTTON_NONE },
162 { ACTION_KBD_UP, BUTTON_UP, BUTTON_NONE },
163 { ACTION_KBD_UP, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
164 { ACTION_KBD_DOWN, BUTTON_DOWN, BUTTON_NONE },
165 { ACTION_KBD_DOWN, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
166
167 LAST_ITEM_IN_LIST
168}; /* button_context_keyboard */
169
170static const struct button_mapping button_context_morse_input[] = {
171 { ACTION_KBD_CURSOR_LEFT, BUTTON_LEFT, BUTTON_NONE },
172 { ACTION_KBD_CURSOR_LEFT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
173 { ACTION_KBD_CURSOR_RIGHT, BUTTON_RIGHT, BUTTON_NONE },
174 { ACTION_KBD_CURSOR_RIGHT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
175 { ACTION_KBD_BACKSPACE, BUTTON_MENU|BUTTON_REL, BUTTON_MENU },
176 { ACTION_KBD_DONE, BUTTON_MENU|BUTTON_REPEAT, BUTTON_NONE },
177 { ACTION_KBD_ABORT, BUTTON_OFF, BUTTON_NONE },
178 { ACTION_KBD_DOWN, BUTTON_DOWN, BUTTON_NONE },
179 { ACTION_KBD_DOWN, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
180 { ACTION_KBD_SELECT, BUTTON_UP, BUTTON_NONE },
181 { ACTION_KBD_MORSE_SELECT, BUTTON_UP|BUTTON_REL, BUTTON_NONE },
182
183 LAST_ITEM_IN_LIST
184}; /* button_context_morse_input */
185
186#if CONFIG_TUNER
187static const struct button_mapping button_context_radio[] = {
188 { ACTION_FM_MENU, BUTTON_MENU | BUTTON_REPEAT, BUTTON_NONE },
189 { ACTION_FM_RECORD_DBLPRE, BUTTON_MENU, BUTTON_NONE},
190 { ACTION_FM_RECORD, BUTTON_MENU | BUTTON_REL, BUTTON_NONE },
191 { ACTION_FM_STOP, BUTTON_OFF | BUTTON_REPEAT, BUTTON_OFF },
192 { ACTION_FM_EXIT, BUTTON_OFF | BUTTON_REL, BUTTON_OFF },
193 { ACTION_STD_PREV, BUTTON_LEFT, BUTTON_NONE },
194 { ACTION_STD_PREVREPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
195 { ACTION_STD_NEXT, BUTTON_RIGHT, BUTTON_NONE },
196 { ACTION_STD_NEXTREPEAT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
197
198#ifndef HAS_BUTTON_HOLD
199 { ACTION_STD_KEYLOCK, BUTTON_MENU|BUTTON_DOWN, BUTTON_NONE },
200#endif
201
202 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS)
203
204};
205#endif
206
207const struct button_mapping* get_context_mapping( int context )
208{
209 switch( context )
210 {
211 case CONTEXT_STD:
212 return button_context_standard;
213
214 case CONTEXT_WPS:
215 return button_context_wps;
216
217 case CONTEXT_SETTINGS:
218 return button_context_settings;
219
220 case CONTEXT_YESNOSCREEN:
221 return button_context_yesno;
222
223 case CONTEXT_BOOKMARKSCREEN:
224 return button_context_bmark;
225 case CONTEXT_PITCHSCREEN:
226 return button_context_pitchscreen;
227 case CONTEXT_TREE:
228 case CONTEXT_MAINMENU:
229 if (global_settings.hold_lr_for_scroll_in_list)
230 return button_context_tree_scroll_lr;
231 /* else fall through to CUSTOM|CONTEXT_TREE */
232 case CONTEXT_CUSTOM|CONTEXT_TREE:
233 return button_context_tree;
234#ifdef HAVE_RECORDING
235 case CONTEXT_RECSCREEN:
236 return button_context_recscreen;
237 case CONTEXT_SETTINGS_RECTRIGGER:
238 return button_context_rectrigger;
239#endif
240 case CONTEXT_KEYBOARD:
241 return button_context_keyboard;
242 case CONTEXT_MORSE_INPUT:
243 return button_context_morse_input;
244#if CONFIG_TUNER
245 case CONTEXT_FM:
246 return button_context_radio;
247#endif
248 case CONTEXT_LIST:
249 default:
250 return button_context_standard;
251 }
252}