diff options
Diffstat (limited to 'apps/keymaps/keymap-ipod.c')
-rw-r--r-- | apps/keymaps/keymap-ipod.c | 66 |
1 files changed, 60 insertions, 6 deletions
diff --git a/apps/keymaps/keymap-ipod.c b/apps/keymaps/keymap-ipod.c index 6d06bd0244..aea0c444a2 100644 --- a/apps/keymaps/keymap-ipod.c +++ b/apps/keymaps/keymap-ipod.c | |||
@@ -161,7 +161,7 @@ static const struct button_mapping button_context_pitchscreen[] = { | |||
161 | 161 | ||
162 | static const struct button_mapping button_context_keyboard[] = { | 162 | static const struct button_mapping button_context_keyboard[] = { |
163 | { ACTION_KBD_LEFT, BUTTON_LEFT, BUTTON_NONE }, | 163 | { ACTION_KBD_LEFT, BUTTON_LEFT, BUTTON_NONE }, |
164 | { ACTION_KBD_LEFT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, | 164 | { ACTION_KBD_LEFT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, |
165 | { ACTION_KBD_RIGHT, BUTTON_RIGHT, BUTTON_NONE }, | 165 | { ACTION_KBD_RIGHT, BUTTON_RIGHT, BUTTON_NONE }, |
166 | { ACTION_KBD_RIGHT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, | 166 | { ACTION_KBD_RIGHT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, |
167 | { ACTION_KBD_SELECT, BUTTON_SELECT, BUTTON_NONE }, | 167 | { ACTION_KBD_SELECT, BUTTON_SELECT, BUTTON_NONE }, |
@@ -204,7 +204,7 @@ const struct button_mapping button_context_recscreen[] = { | |||
204 | { ACTION_FM_STOP, BUTTON_PLAY | BUTTON_REPEAT, BUTTON_PLAY }, | 204 | { ACTION_FM_STOP, BUTTON_PLAY | BUTTON_REPEAT, BUTTON_PLAY }, |
205 | { ACTION_FM_MODE, BUTTON_SELECT, BUTTON_NONE }, | 205 | { ACTION_FM_MODE, BUTTON_SELECT, BUTTON_NONE }, |
206 | { ACTION_FM_EXIT, BUTTON_MENU | BUTTON_REL, BUTTON_MENU }, | 206 | { ACTION_FM_EXIT, BUTTON_MENU | BUTTON_REL, BUTTON_MENU }, |
207 | { ACTION_FM_PLAY, BUTTON_PLAY | BUTTON_REL, BUTTON_PLAY }, | 207 | { ACTION_FM_PLAY, BUTTON_PLAY | BUTTON_REL, BUTTON_PLAY }, |
208 | { ACTION_SETTINGS_INC, BUTTON_SCROLL_FWD, BUTTON_NONE }, | 208 | { ACTION_SETTINGS_INC, BUTTON_SCROLL_FWD, BUTTON_NONE }, |
209 | { ACTION_SETTINGS_INCREPEAT,BUTTON_SCROLL_FWD|BUTTON_REPEAT, BUTTON_NONE }, | 209 | { ACTION_SETTINGS_INCREPEAT,BUTTON_SCROLL_FWD|BUTTON_REPEAT, BUTTON_NONE }, |
210 | { ACTION_SETTINGS_DEC, BUTTON_SCROLL_BACK, BUTTON_NONE }, | 210 | { ACTION_SETTINGS_DEC, BUTTON_SCROLL_BACK, BUTTON_NONE }, |
@@ -309,11 +309,20 @@ static const struct button_mapping button_context_usb_hid_mode_mouse[] = { | |||
309 | *****************************************************************************/ | 309 | *****************************************************************************/ |
310 | 310 | ||
311 | static const struct button_mapping remote_button_context_standard[] = { | 311 | static const struct button_mapping remote_button_context_standard[] = { |
312 | { ACTION_STD_PREV, BUTTON_RC_UP, BUTTON_NONE }, | ||
313 | { ACTION_STD_PREVREPEAT, BUTTON_RC_UP|BUTTON_REPEAT, BUTTON_NONE }, | ||
314 | { ACTION_STD_NEXT, BUTTON_RC_DOWN, BUTTON_NONE }, | ||
315 | { ACTION_STD_NEXTREPEAT, BUTTON_RC_DOWN|BUTTON_REPEAT, BUTTON_NONE }, | ||
316 | |||
312 | { ACTION_STD_PREV, BUTTON_RC_LEFT, BUTTON_NONE }, | 317 | { ACTION_STD_PREV, BUTTON_RC_LEFT, BUTTON_NONE }, |
313 | { ACTION_STD_NEXT, BUTTON_RC_RIGHT, BUTTON_NONE }, | 318 | { ACTION_STD_NEXT, BUTTON_RC_RIGHT, BUTTON_NONE }, |
314 | { ACTION_STD_CANCEL, BUTTON_RC_STOP, BUTTON_NONE }, | 319 | { ACTION_STD_CANCEL, BUTTON_RC_STOP, BUTTON_NONE }, |
315 | { ACTION_STD_OK, BUTTON_RC_PLAY, BUTTON_NONE }, | 320 | { ACTION_STD_OK, BUTTON_RC_PLAY, BUTTON_NONE }, |
316 | 321 | ||
322 | { ACTION_STD_MENU, BUTTON_RC_MENU|BUTTON_REL, BUTTON_RC_MENU }, | ||
323 | { ACTION_STD_QUICKSCREEN, BUTTON_RC_MENU|BUTTON_REPEAT, BUTTON_RC_MENU }, | ||
324 | { ACTION_STD_CONTEXT, BUTTON_RC_SELECT|BUTTON_REPEAT, BUTTON_RC_SELECT }, | ||
325 | |||
317 | LAST_ITEM_IN_LIST | 326 | LAST_ITEM_IN_LIST |
318 | }; /* remote_button_context_standard */ | 327 | }; /* remote_button_context_standard */ |
319 | 328 | ||
@@ -322,7 +331,7 @@ static const struct button_mapping remote_button_context_wps[] = { | |||
322 | { ACTION_WPS_VOLDOWN, BUTTON_RC_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE }, | 331 | { ACTION_WPS_VOLDOWN, BUTTON_RC_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE }, |
323 | { ACTION_WPS_VOLUP, BUTTON_RC_VOL_UP, BUTTON_NONE }, | 332 | { ACTION_WPS_VOLUP, BUTTON_RC_VOL_UP, BUTTON_NONE }, |
324 | { ACTION_WPS_VOLUP, BUTTON_RC_VOL_UP|BUTTON_REPEAT, BUTTON_NONE }, | 333 | { ACTION_WPS_VOLUP, BUTTON_RC_VOL_UP|BUTTON_REPEAT, BUTTON_NONE }, |
325 | 334 | // RC_UP and RC_DOWN? | |
326 | { ACTION_WPS_PLAY, BUTTON_RC_PLAY|BUTTON_REL, BUTTON_RC_PLAY }, | 335 | { ACTION_WPS_PLAY, BUTTON_RC_PLAY|BUTTON_REL, BUTTON_RC_PLAY }, |
327 | { ACTION_WPS_STOP, BUTTON_RC_PLAY|BUTTON_REPEAT, BUTTON_NONE }, | 336 | { ACTION_WPS_STOP, BUTTON_RC_PLAY|BUTTON_REPEAT, BUTTON_NONE }, |
328 | { ACTION_WPS_SKIPNEXT, BUTTON_RC_RIGHT|BUTTON_REL, BUTTON_RC_RIGHT }, | 337 | { ACTION_WPS_SKIPNEXT, BUTTON_RC_RIGHT|BUTTON_REL, BUTTON_RC_RIGHT }, |
@@ -331,6 +340,12 @@ static const struct button_mapping remote_button_context_wps[] = { | |||
331 | { ACTION_WPS_SKIPPREV, BUTTON_RC_LEFT|BUTTON_REL, BUTTON_RC_LEFT }, | 340 | { ACTION_WPS_SKIPPREV, BUTTON_RC_LEFT|BUTTON_REL, BUTTON_RC_LEFT }, |
332 | { ACTION_WPS_SEEKBACK, BUTTON_RC_LEFT|BUTTON_REPEAT, BUTTON_NONE }, | 341 | { ACTION_WPS_SEEKBACK, BUTTON_RC_LEFT|BUTTON_REPEAT, BUTTON_NONE }, |
333 | { ACTION_WPS_STOPSEEK, BUTTON_RC_LEFT|BUTTON_REL, BUTTON_RC_LEFT|BUTTON_REPEAT }, | 342 | { ACTION_WPS_STOPSEEK, BUTTON_RC_LEFT|BUTTON_REL, BUTTON_RC_LEFT|BUTTON_REPEAT }, |
343 | { ACTION_WPS_BROWSE, BUTTON_RC_SELECT|BUTTON_REL, BUTTON_RC_SELECT }, | ||
344 | { ACTION_WPS_CONTEXT, BUTTON_RC_SELECT|BUTTON_REPEAT, BUTTON_RC_SELECT }, | ||
345 | { ACTION_WPS_HOTKEY, BUTTON_RC_SELECT|BUTTON_PLAY, BUTTON_NONE }, | ||
346 | { ACTION_WPS_MENU, BUTTON_RC_MENU|BUTTON_REL, BUTTON_RC_MENU }, | ||
347 | { ACTION_WPS_QUICKSCREEN, BUTTON_RC_MENU|BUTTON_REPEAT, BUTTON_RC_MENU }, | ||
348 | |||
334 | 349 | ||
335 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) | 350 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) |
336 | }; /* remote_button_context_wps */ | 351 | }; /* remote_button_context_wps */ |
@@ -338,23 +353,57 @@ static const struct button_mapping remote_button_context_wps[] = { | |||
338 | static const struct button_mapping remote_button_context_tree[] = { | 353 | static const struct button_mapping remote_button_context_tree[] = { |
339 | { ACTION_TREE_WPS, BUTTON_RC_PLAY|BUTTON_REL, BUTTON_RC_PLAY }, | 354 | { ACTION_TREE_WPS, BUTTON_RC_PLAY|BUTTON_REL, BUTTON_RC_PLAY }, |
340 | { ACTION_TREE_STOP, BUTTON_RC_PLAY|BUTTON_REPEAT, BUTTON_RC_PLAY }, | 355 | { ACTION_TREE_STOP, BUTTON_RC_PLAY|BUTTON_REPEAT, BUTTON_RC_PLAY }, |
341 | 356 | { ACTION_TREE_HOTKEY, BUTTON_RC_SELECT|BUTTON_PLAY, BUTTON_NONE }, | |
357 | |||
342 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) | 358 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) |
343 | }; /* remote_button_context_tree */ | 359 | }; /* remote_button_context_tree */ |
344 | 360 | ||
361 | static const struct button_mapping remote_button_context_quickscreen[] = { | ||
362 | { ACTION_QS_TOP, BUTTON_RC_MENU, BUTTON_NONE }, | ||
363 | { ACTION_QS_TOP, BUTTON_RC_MENU|BUTTON_REPEAT, BUTTON_NONE }, | ||
364 | { ACTION_QS_DOWN, BUTTON_RC_PLAY, BUTTON_NONE }, | ||
365 | { ACTION_QS_DOWN, BUTTON_RC_PLAY|BUTTON_REPEAT, BUTTON_NONE }, | ||
366 | { ACTION_QS_LEFT, BUTTON_RC_LEFT, BUTTON_NONE }, | ||
367 | { ACTION_QS_LEFT, BUTTON_RC_LEFT|BUTTON_REPEAT, BUTTON_NONE }, | ||
368 | { ACTION_QS_RIGHT, BUTTON_RC_RIGHT, BUTTON_NONE }, | ||
369 | { ACTION_QS_RIGHT, BUTTON_RC_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, | ||
370 | { ACTION_STD_CANCEL, BUTTON_RC_SELECT|BUTTON_REL, BUTTON_RC_SELECT }, | ||
371 | { ACTION_QS_VOLDOWN, BUTTON_RC_VOL_DOWN, BUTTON_NONE }, | ||
372 | { ACTION_QS_VOLDOWN, BUTTON_RC_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE }, | ||
373 | { ACTION_QS_VOLUP, BUTTON_RC_VOL_UP, BUTTON_NONE }, | ||
374 | { ACTION_QS_VOLUP, BUTTON_RC_VOL_UP|BUTTON_REPEAT, BUTTON_NONE }, | ||
375 | |||
376 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) | ||
377 | }; /* button_context_quickscreen */ | ||
378 | |||
345 | #if CONFIG_TUNER | 379 | #if CONFIG_TUNER |
346 | static const struct button_mapping remote_button_context_radio[] = { | 380 | static const struct button_mapping remote_button_context_radio[] = { |
381 | { ACTION_FM_MENU, BUTTON_RC_SELECT | BUTTON_REPEAT, BUTTON_NONE }, | ||
347 | { ACTION_FM_STOP, BUTTON_RC_PLAY | BUTTON_REPEAT, BUTTON_NONE }, | 382 | { ACTION_FM_STOP, BUTTON_RC_PLAY | BUTTON_REPEAT, BUTTON_NONE }, |
348 | { ACTION_FM_PLAY, BUTTON_RC_PLAY | BUTTON_REL, BUTTON_RC_PLAY }, | 383 | { ACTION_FM_MODE, BUTTON_RC_SELECT, BUTTON_NONE }, |
384 | { ACTION_FM_EXIT, BUTTON_RC_MENU | BUTTON_REL, BUTTON_RC_MENU }, | ||
385 | |||
386 | { ACTION_FM_PLAY, BUTTON_RC_PLAY | BUTTON_REL, BUTTON_RC_PLAY }, | ||
387 | { ACTION_SETTINGS_INC, BUTTON_RC_UP, BUTTON_NONE }, | ||
388 | { ACTION_SETTINGS_INCREPEAT,BUTTON_RC_UP|BUTTON_REPEAT, BUTTON_NONE }, | ||
389 | { ACTION_SETTINGS_DEC, BUTTON_RC_DOWN, BUTTON_NONE }, | ||
390 | { ACTION_SETTINGS_DECREPEAT,BUTTON_RC_DOWN|BUTTON_REPEAT,BUTTON_NONE }, | ||
391 | |||
349 | { ACTION_STD_NEXT, BUTTON_RC_RIGHT|BUTTON_REL, BUTTON_RC_RIGHT }, | 392 | { ACTION_STD_NEXT, BUTTON_RC_RIGHT|BUTTON_REL, BUTTON_RC_RIGHT }, |
350 | { ACTION_STD_NEXTREPEAT, BUTTON_RC_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, | 393 | { ACTION_STD_NEXTREPEAT, BUTTON_RC_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, |
351 | { ACTION_STD_PREV, BUTTON_RC_LEFT|BUTTON_REL, BUTTON_RC_LEFT }, | 394 | { ACTION_STD_PREV, BUTTON_RC_LEFT|BUTTON_REL, BUTTON_RC_LEFT }, |
352 | { ACTION_STD_PREVREPEAT, BUTTON_RC_LEFT|BUTTON_REPEAT, BUTTON_NONE }, | 395 | { ACTION_STD_PREVREPEAT, BUTTON_RC_LEFT|BUTTON_REPEAT, BUTTON_NONE }, |
353 | 396 | ||
354 | LAST_ITEM_IN_LIST | 397 | LAST_ITEM_IN_LIST |
355 | }; /* remote_button_context_radio */ | 398 | }; /* remote_button_context_radio */ |
356 | #endif | 399 | #endif |
357 | 400 | ||
401 | static const struct button_mapping remote_button_context_yesno[] = { | ||
402 | { ACTION_YESNO_ACCEPT, BUTTON_RC_SELECT, BUTTON_NONE }, | ||
403 | { ACTION_STD_CANCEL, BUTTON_RC_PLAY, BUTTON_NONE }, | ||
404 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) | ||
405 | }; /* button_context_yesno */ | ||
406 | |||
358 | static const struct button_mapping* get_context_mapping_remote( int context ) | 407 | static const struct button_mapping* get_context_mapping_remote( int context ) |
359 | { | 408 | { |
360 | context ^= CONTEXT_REMOTE; | 409 | context ^= CONTEXT_REMOTE; |
@@ -364,13 +413,18 @@ static const struct button_mapping* get_context_mapping_remote( int context ) | |||
364 | case CONTEXT_WPS: | 413 | case CONTEXT_WPS: |
365 | return remote_button_context_wps; | 414 | return remote_button_context_wps; |
366 | case CONTEXT_TREE: | 415 | case CONTEXT_TREE: |
416 | case CONTEXT_MAINMENU: | ||
367 | case CONTEXT_CUSTOM|CONTEXT_TREE: | 417 | case CONTEXT_CUSTOM|CONTEXT_TREE: |
368 | return remote_button_context_tree; | 418 | return remote_button_context_tree; |
419 | case CONTEXT_QUICKSCREEN: | ||
420 | return remote_button_context_quickscreen; | ||
369 | 421 | ||
370 | #if CONFIG_TUNER | 422 | #if CONFIG_TUNER |
371 | case CONTEXT_FM: | 423 | case CONTEXT_FM: |
372 | return remote_button_context_radio; | 424 | return remote_button_context_radio; |
373 | #endif | 425 | #endif |
426 | case CONTEXT_YESNOSCREEN: | ||
427 | return remote_button_context_yesno; | ||
374 | default: | 428 | default: |
375 | return remote_button_context_standard; | 429 | return remote_button_context_standard; |
376 | } | 430 | } |