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.c52
1 files changed, 52 insertions, 0 deletions
diff --git a/apps/keymaps/keymap-ipod.c b/apps/keymaps/keymap-ipod.c
index 1a8f7a25ff..9b3323bb82 100644
--- a/apps/keymaps/keymap-ipod.c
+++ b/apps/keymaps/keymap-ipod.c
@@ -193,6 +193,26 @@ const struct button_mapping button_context_recscreen[] = {
193}; /* button_context_recscreen */ 193}; /* button_context_recscreen */
194#endif 194#endif
195 195
196/** FM Radio Screen **/
197 #if CONFIG_TUNER
198 static const struct button_mapping button_context_radio[] = {
199 { ACTION_FM_MENU, BUTTON_SELECT | BUTTON_REPEAT, BUTTON_NONE },
200 { ACTION_FM_STOP, BUTTON_PLAY | BUTTON_REPEAT, BUTTON_PLAY },
201 { ACTION_FM_MODE, BUTTON_SELECT, BUTTON_NONE },
202 { ACTION_FM_EXIT, BUTTON_MENU | BUTTON_REL, BUTTON_NONE },
203 { ACTION_FM_PLAY, BUTTON_PLAY | BUTTON_REL, BUTTON_PLAY },
204 { ACTION_SETTINGS_INC, BUTTON_SCROLL_FWD, BUTTON_NONE },
205 { ACTION_SETTINGS_INCREPEAT,BUTTON_SCROLL_FWD|BUTTON_REPEAT, BUTTON_NONE },
206 { ACTION_SETTINGS_DEC, BUTTON_SCROLL_BACK, BUTTON_NONE },
207 { ACTION_SETTINGS_DECREPEAT,BUTTON_SCROLL_BACK|BUTTON_REPEAT,BUTTON_NONE },
208 { ACTION_STD_NEXT, BUTTON_RIGHT, BUTTON_NONE },
209 { ACTION_STD_NEXTREPEAT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
210 { ACTION_STD_PREV, BUTTON_LEFT, BUTTON_NONE },
211 { ACTION_STD_PREVREPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
212 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS)
213 }; /* button_context_radio */
214 #endif
215
196#ifdef USB_ENABLE_HID 216#ifdef USB_ENABLE_HID
197static const struct button_mapping button_context_usb_hid[] = { 217static const struct button_mapping button_context_usb_hid[] = {
198 { ACTION_USB_HID_MODE_SWITCH_NEXT, BUTTON_SELECT|BUTTON_RIGHT|BUTTON_REL, BUTTON_SELECT|BUTTON_RIGHT }, 218 { ACTION_USB_HID_MODE_SWITCH_NEXT, BUTTON_SELECT|BUTTON_RIGHT|BUTTON_REL, BUTTON_SELECT|BUTTON_RIGHT },
@@ -311,6 +331,26 @@ static const struct button_mapping remote_button_context_wps[] = {
311 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) 331 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
312}; /* remote_button_context_wps */ 332}; /* remote_button_context_wps */
313 333
334static const struct button_mapping remote_button_context_tree[] = {
335 { ACTION_TREE_WPS, BUTTON_RC_PLAY|BUTTON_REL, BUTTON_RC_PLAY },
336 { ACTION_TREE_STOP, BUTTON_RC_PLAY|BUTTON_REPEAT, BUTTON_RC_PLAY },
337
338 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
339}; /* remote_button_context_tree */
340
341#if CONFIG_TUNER
342 static const struct button_mapping remote_button_context_radio[] = {
343 { ACTION_FM_STOP, BUTTON_RC_PLAY | BUTTON_REPEAT, BUTTON_NONE },
344 { ACTION_FM_PLAY, BUTTON_RC_PLAY | BUTTON_REL, BUTTON_RC_PLAY },
345 { ACTION_STD_NEXT, BUTTON_RC_RIGHT|BUTTON_REL, BUTTON_RC_RIGHT },
346 { ACTION_STD_NEXTREPEAT, BUTTON_RC_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
347 { ACTION_STD_PREV, BUTTON_RC_LEFT|BUTTON_REL, BUTTON_RC_LEFT },
348 { ACTION_STD_PREVREPEAT, BUTTON_RC_LEFT|BUTTON_REPEAT, BUTTON_NONE },
349
350 LAST_ITEM_IN_LIST
351 }; /* remote_button_context_radio */
352#endif
353
314static const struct button_mapping* get_context_mapping_remote( int context ) 354static const struct button_mapping* get_context_mapping_remote( int context )
315{ 355{
316 context ^= CONTEXT_REMOTE; 356 context ^= CONTEXT_REMOTE;
@@ -319,6 +359,14 @@ static const struct button_mapping* get_context_mapping_remote( int context )
319 { 359 {
320 case CONTEXT_WPS: 360 case CONTEXT_WPS:
321 return remote_button_context_wps; 361 return remote_button_context_wps;
362 case CONTEXT_TREE:
363 case CONTEXT_CUSTOM|CONTEXT_TREE:
364 return remote_button_context_tree;
365
366#ifdef CONFIG_TUNER
367 case CONTEXT_FM:
368 return remote_button_context_radio;
369#endif
322 default: 370 default:
323 return remote_button_context_standard; 371 return remote_button_context_standard;
324 } 372 }
@@ -371,6 +419,10 @@ const struct button_mapping* get_context_mapping(int context)
371 case CONTEXT_RECSCREEN: 419 case CONTEXT_RECSCREEN:
372 return button_context_recscreen; 420 return button_context_recscreen;
373#endif 421#endif
422#if CONFIG_TUNER
423 case CONTEXT_FM:
424 return button_context_radio;
425#endif
374#ifdef USB_ENABLE_HID 426#ifdef USB_ENABLE_HID
375 case CONTEXT_USB_HID: 427 case CONTEXT_USB_HID:
376 return button_context_usb_hid; 428 return button_context_usb_hid;