summaryrefslogtreecommitdiff
path: root/apps/keymaps/keymap-ipod.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/keymaps/keymap-ipod.c')
-rw-r--r--apps/keymaps/keymap-ipod.c40
1 files changed, 39 insertions, 1 deletions
diff --git a/apps/keymaps/keymap-ipod.c b/apps/keymaps/keymap-ipod.c
index a7aeb27568..163a810036 100644
--- a/apps/keymaps/keymap-ipod.c
+++ b/apps/keymaps/keymap-ipod.c
@@ -188,6 +188,23 @@ const struct button_mapping button_context_recscreen[] = {
188}; /* button_context_recscreen */ 188}; /* button_context_recscreen */
189#endif 189#endif
190 190
191#ifdef HAVE_USBSTACK
192static const struct button_mapping button_context_usb_hid[] = {
193 { ACTION_USB_HID_PLAY, BUTTON_PLAY, BUTTON_NONE },
194 { ACTION_USB_HID_STOP, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_NONE },
195 { ACTION_USB_HID_SKIPPREV, BUTTON_LEFT, BUTTON_NONE },
196 { ACTION_USB_HID_SKIPNEXT, BUTTON_RIGHT, BUTTON_NONE },
197 { ACTION_USB_HID_VOLUP, BUTTON_SCROLL_FWD, BUTTON_NONE },
198 { ACTION_USB_HID_VOLUP, BUTTON_SCROLL_FWD|BUTTON_REPEAT, BUTTON_NONE },
199 { ACTION_USB_HID_VOLDOWN, BUTTON_SCROLL_BACK, BUTTON_NONE },
200 { ACTION_USB_HID_VOLDOWN, BUTTON_SCROLL_BACK|BUTTON_REPEAT, BUTTON_NONE },
201 { ACTION_USB_HID_MUTE, BUTTON_SELECT, BUTTON_NONE },
202 { ACTION_USB_HID_MENU, BUTTON_MENU, BUTTON_NONE },
203
204 LAST_ITEM_IN_LIST
205}; /* button_context_usb_hid */
206#endif
207
191#if BUTTON_REMOTE != 0 208#if BUTTON_REMOTE != 0
192/***************************************************************************** 209/*****************************************************************************
193 * Remote control mappings 210 * Remote control mappings
@@ -220,6 +237,20 @@ static const struct button_mapping remote_button_context_wps[] = {
220 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) 237 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
221}; 238};
222 239
240#ifdef HAVE_USBSTACK
241static const struct button_mapping remote_button_context_usb_hid[] = {
242 { ACTION_USB_HID_PLAY, BUTTON_RC_PLAY, BUTTON_NONE },
243 { ACTION_USB_HID_STOP, BUTTON_RC_PLAY|BUTTON_REPEAT, BUTTON_NONE },
244 { ACTION_USB_HID_SKIPPREV, BUTTON_RC_LEFT, BUTTON_NONE },
245 { ACTION_USB_HID_SKIPNEXT, BUTTON_RC_RIGHT, BUTTON_NONE },
246 { ACTION_USB_HID_VOLUP, BUTTON_RC_VOL_UP, BUTTON_NONE },
247 { ACTION_USB_HID_VOLUP, BUTTON_RC_VOL_UP|BUTTON_REPEAT, BUTTON_NONE },
248 { ACTION_USB_HID_VOLDOWN, BUTTON_RC_VOL_DOWN, BUTTON_NONE },
249 { ACTION_USB_HID_VOLDOWN, BUTTON_RC_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE },
250
251 LAST_ITEM_IN_LIST
252}; /* remote_button_context_usb_hid */
253#endif
223 254
224static const struct button_mapping* get_context_mapping_remote( int context ) 255static const struct button_mapping* get_context_mapping_remote( int context )
225{ 256{
@@ -229,7 +260,10 @@ static const struct button_mapping* get_context_mapping_remote( int context )
229 { 260 {
230 case CONTEXT_WPS: 261 case CONTEXT_WPS:
231 return remote_button_context_wps; 262 return remote_button_context_wps;
232 263#ifdef HAVE_USBSTACK
264 case CONTEXT_USB_HID:
265 return remote_button_context_usb_hid;
266#endif
233 default: 267 default:
234 return remote_button_context_standard; 268 return remote_button_context_standard;
235 } 269 }
@@ -282,6 +316,10 @@ const struct button_mapping* get_context_mapping(int context)
282 case CONTEXT_RECSCREEN: 316 case CONTEXT_RECSCREEN:
283 return button_context_recscreen; 317 return button_context_recscreen;
284#endif 318#endif
319#ifdef HAVE_USBSTACK
320 case CONTEXT_USB_HID:
321 return button_context_usb_hid;
322#endif
285 default: 323 default:
286 return button_context_standard; 324 return button_context_standard;
287 } 325 }