diff options
Diffstat (limited to 'apps/plugins/xworld/keymaps.h')
-rw-r--r-- | apps/plugins/xworld/keymaps.h | 183 |
1 files changed, 183 insertions, 0 deletions
diff --git a/apps/plugins/xworld/keymaps.h b/apps/plugins/xworld/keymaps.h new file mode 100644 index 0000000000..edba05b9d2 --- /dev/null +++ b/apps/plugins/xworld/keymaps.h | |||
@@ -0,0 +1,183 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2014 Franklin Wei, Benjamin Brown | ||
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 | #ifndef _XWORLD_KEYMAPS_H | ||
23 | #define _XWORLD_KEYMAPS_H | ||
24 | #endif | ||
25 | |||
26 | #if (CONFIG_KEYPAD == PHILIPS_HDD1630_PAD) || \ | ||
27 | (CONFIG_KEYPAD == PHILIPS_HDD6330_PAD) || \ | ||
28 | (CONFIG_KEYPAD == PHILIPS_SA9200_PAD) || \ | ||
29 | (CONFIG_KEYPAD == CREATIVE_ZENXFI2_PAD) || \ | ||
30 | (CONFIG_KEYPAD == CREATIVE_ZENXFI3_PAD) || \ | ||
31 | (CONFIG_KEYPAD == SANSA_CONNECT_PAD) || \ | ||
32 | (CONFIG_KEYPAD == SANSA_C200_PAD) || \ | ||
33 | (CONFIG_KEYPAD == SANSA_CLIP_PAD) || \ | ||
34 | (CONFIG_KEYPAD == SANSA_E200_PAD) || \ | ||
35 | (CONFIG_KEYPAD == SANSA_FUZE_PAD) || \ | ||
36 | (CONFIG_KEYPAD == SANSA_FUZEPLUS_PAD) || \ | ||
37 | (CONFIG_KEYPAD == GIGABEAT_PAD) || \ | ||
38 | (CONFIG_KEYPAD == GIGABEAT_S_PAD) || \ | ||
39 | (CONFIG_KEYPAD == SAMSUNG_YH920_PAD) || \ | ||
40 | (CONFIG_KEYPAD == SAMSUNG_YH820_PAD) || \ | ||
41 | (CONFIG_KEYPAD == IAUDIO_X5M5_PAD) || \ | ||
42 | (CONFIG_KEYPAD == CREATIVE_ZEN_PAD) || \ | ||
43 | (CONFIG_KEYPAD == SONY_NWZ_PAD) || \ | ||
44 | (CONFIG_KEYPAD == CREATIVEZVM_PAD) || \ | ||
45 | (CONFIG_KEYPAD == SAMSUNG_YPR0_PAD) || \ | ||
46 | (CONFIG_KEYPAD == IRIVER_H300_PAD) || \ | ||
47 | (CONFIG_KEYPAD == HM801_PAD) | ||
48 | #define BTN_UP BUTTON_UP | ||
49 | #define BTN_DOWN BUTTON_DOWN | ||
50 | #define BTN_LEFT BUTTON_LEFT | ||
51 | #define BTN_RIGHT BUTTON_RIGHT | ||
52 | |||
53 | #if (CONFIG_KEYPAD == SANSA_FUZEPLUS_PAD) | ||
54 | #define BTN_UP_LEFT BUTTON_BACK | ||
55 | #define BTN_UP_RIGHT BUTTON_PLAYPAUSE | ||
56 | #define BTN_DOWN_LEFT BUTTON_BOTTOMLEFT | ||
57 | #define BTN_DOWN_RIGHT BUTTON_BOTTOMRIGHT | ||
58 | #endif | ||
59 | |||
60 | #if (CONFIG_KEYPAD == PHILIPS_HDD1630_PAD) || \ | ||
61 | (CONFIG_KEYPAD == PHILIPS_HDD6330_PAD) || \ | ||
62 | (CONFIG_KEYPAD == PHILIPS_SA9200_PAD) || \ | ||
63 | (CONFIG_KEYPAD == CREATIVE_ZENXFI2_PAD) || \ | ||
64 | (CONFIG_KEYPAD == CREATIVE_ZENXFI3_PAD) || \ | ||
65 | (CONFIG_KEYPAD == SANSA_CONNECT_PAD) || \ | ||
66 | (CONFIG_KEYPAD == SANSA_C200_PAD) || \ | ||
67 | (CONFIG_KEYPAD == SANSA_FUZEPLUS_PAD) || \ | ||
68 | (CONFIG_KEYPAD == DX50_PAD) || \ | ||
69 | (CONFIG_KEYPAD == ONDAVX747_PAD) | ||
70 | #define BTN_FIRE BUTTON_VOL_UP | ||
71 | #define BTN_PAUSE BUTTON_VOL_DOWN | ||
72 | |||
73 | #elif (CONFIG_KEYPAD == SANSA_FUZE_PAD) | ||
74 | #define BTN_FIRE BUTTON_HOME | ||
75 | #define BTN_PAUSE BUTTON_SELECT | ||
76 | |||
77 | #elif (CONFIG_KEYPAD == SAMSUNG_YH920_PAD) | ||
78 | #define BTN_FIRE BUTTON_FFWD | ||
79 | #define BTN_PAUSE BUTTON_REW | ||
80 | |||
81 | #elif (CONFIG_KEYPAD == SANSA_E200_PAD) | ||
82 | #define BTN_FIRE BUTTON_REC | ||
83 | #define BTN_PAUSE BUTTON_POWER | ||
84 | |||
85 | #elif (CONFIG_KEYPAD == SANSA_CLIP_PAD) | ||
86 | #define BTN_FIRE BUTTON_SELECT | ||
87 | #define BTN_PAUSE BUTTON_POWER | ||
88 | |||
89 | #elif (CONFIG_KEYPAD == CREATIVE_ZEN_PAD) | ||
90 | #define BTN_FIRE BUTTON_SELECT | ||
91 | #define BTN_PAUSE BUTTON_BACK | ||
92 | |||
93 | #elif (CONFIG_KEYPAD == CREATIVEZVM_PAD) | ||
94 | #define BTN_FIRE BUTTON_PLAY | ||
95 | #define BTN_PAUSE BUTTON_MENU | ||
96 | |||
97 | #elif (CONFIG_KEYPAD == SAMSUNG_YPR0_PAD) | ||
98 | #define BTN_FIRE BUTTON_USER | ||
99 | #define BTN_PAUSE BUTTON_MENU | ||
100 | |||
101 | #elif (CONFIG_KEYPAD == SONY_NWZ_PAD) | ||
102 | #define BTN_FIRE BUTTON_PLAY | ||
103 | #define BTN_PAUSE BUTTON_BACK | ||
104 | |||
105 | #elif (CONFIG_KEYPAD == IRIVER_H300_PAD) | ||
106 | #define BTN_FIRE BUTTON_REC | ||
107 | #define BTN_PAUSE BUTTON_MODE | ||
108 | |||
109 | #elif (CONFIG_KEYPAD == HM801_PAD) | ||
110 | #define BTN_FIRE BUTTON_PREV | ||
111 | #define BTN_PAUSE BUTTON_NEXT | ||
112 | |||
113 | #elif (CONFIG_KEYPAD == SAMSUNG_YH820_PAD) || \ | ||
114 | (CONFIG_KEYPAD == IAUDIO_X5M5_PAD) | ||
115 | #define BTN_FIRE BUTTON_REC | ||
116 | #define BTN_PAUSE BUTTON_PLAY | ||
117 | |||
118 | #elif (CONFIG_KEYPAD == GIGABEAT_PAD) || \ | ||
119 | (CONFIG_KEYPAD == GIGABEAT_S_PAD) | ||
120 | #define BTN_FIRE BUTTON_VOL_UP | ||
121 | #define BTN_PAUSE BUTTON_MENU | ||
122 | #endif | ||
123 | |||
124 | #elif (CONFIG_KEYPAD == PBELL_VIBE500_PAD) | ||
125 | #define BTN_UP BUTTON_OK | ||
126 | #define BTN_DOWN BUTTON_CANCEL | ||
127 | #define BTN_LEFT BUTTON_MENU | ||
128 | #define BTN_RIGHT BUTTON_PLAY | ||
129 | #define BTN_FIRE BUTTON_POWER | ||
130 | #define BTN_PAUSE BUTTON_REC | ||
131 | |||
132 | #elif (CONFIG_KEYPAD == IRIVER_H10_PAD) | ||
133 | #define BTN_UP BUTTON_SCROLL_UP | ||
134 | #define BTN_DOWN BUTTON_SCROLL_DOWN | ||
135 | #define BTN_LEFT BUTTON_LEFT | ||
136 | #define BTN_RIGHT BUTTON_RIGHT | ||
137 | #define BTN_FIRE BUTTON_REW | ||
138 | #define BTN_PAUSE BUTTON_PLAY | ||
139 | |||
140 | #elif (CONFIG_KEYPAD == MROBE500_PAD) | ||
141 | #define BTN_FIRE BUTTON_POWER | ||
142 | |||
143 | #elif (CONFIG_KEYPAD == MROBE_REMOTE) | ||
144 | #define BTN_UP BUTTON_RC_PLAY | ||
145 | #define BTN_DOWN BUTTON_RC_DOWN | ||
146 | #define BTN_LEFT BUTTON_RC_REW | ||
147 | #define BTN_RIGHT BUTTON_RC_FF | ||
148 | |||
149 | #elif (CONFIG_KEYPAD == IPOD_4G_PAD) || \ | ||
150 | (CONFIG_KEYPAD == IPOD_3G_PAD) || \ | ||
151 | (CONFIG_KEYPAD == IPOD_1G2G_PAD) | ||
152 | #define BTN_UP BUTTON_MENU | ||
153 | #define BTN_DOWN BUTTON_PLAY | ||
154 | #define BTN_LEFT BUTTON_LEFT | ||
155 | #define BTN_RIGHT BUTTON_RIGHT | ||
156 | #define BTN_FIRE BUTTON_SELECT | ||
157 | #define BTN_PAUSE (BUTTON_MENU | BUTTON_SELECT) | ||
158 | |||
159 | #elif (CONFIG_KEYPAD == ONDAVX777_PAD) | ||
160 | #define BTN_FIRE BUTTON_POWER | ||
161 | |||
162 | #elif (CONFIG_KEYPAD == DX50_PAD) | ||
163 | #define BTN_FIRE BUTTON_PLUS | ||
164 | #define BTN_PAUSE BUTTON_MENU | ||
165 | |||
166 | #else | ||
167 | #error Unsupported keypad | ||
168 | #endif | ||
169 | |||
170 | #ifdef HAVE_TOUCHSCREEN | ||
171 | #define BTN_UP BUTTON_TOPMIDDLE | ||
172 | #define BTN_DOWN BUTTON_BOTTOMMIDDLE | ||
173 | #define BTN_LEFT BUTTON_LEFT | ||
174 | #define BTN_RIGHT BUTTON_RIGHT | ||
175 | |||
176 | #if (CONFIG_KEYPAD == MROBE500_PAD) | ||
177 | #define BTN_PAUSE BUTTON_BOTTOMLEFT | ||
178 | |||
179 | #elif (CONFIG_KEYPAD != COWON_D2_PAD) || (CONFIG_KEYPAD != DX50_PAD) | ||
180 | #define BTN_FIRE BUTTON_BOTTOMLEFT | ||
181 | #define BTN_PAUSE BUTTON_TOPLEFT | ||
182 | #endif | ||
183 | #endif | ||