summaryrefslogtreecommitdiff
path: root/apps/keymaps/keymap-h1x0_h3x0.c
diff options
context:
space:
mode:
authorMartin Scarratt <mmmm@rockbox.org>2006-08-20 21:33:40 +0000
committerMartin Scarratt <mmmm@rockbox.org>2006-08-20 21:33:40 +0000
commitc8bd9129bf146c3c0bbacc744ab509709a004fd7 (patch)
treeecf927b6f31c94f12e073c0b9fbd1a144ecd83d3 /apps/keymaps/keymap-h1x0_h3x0.c
parent7847dde8cf00838de8ff75b8398ffbb1921baf8b (diff)
downloadrockbox-c8bd9129bf146c3c0bbacc744ab509709a004fd7.tar.gz
rockbox-c8bd9129bf146c3c0bbacc744ab509709a004fd7.zip
Button action code for recording screen. Shouldnt make any noticable difference in recording screen button operation except for H300 I-River remote, which should now work as expected, -10 button = LCD off
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10666 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/keymaps/keymap-h1x0_h3x0.c')
-rw-r--r--apps/keymaps/keymap-h1x0_h3x0.c60
1 files changed, 54 insertions, 6 deletions
diff --git a/apps/keymaps/keymap-h1x0_h3x0.c b/apps/keymaps/keymap-h1x0_h3x0.c
index 5a6f823d53..969bb9c46b 100644
--- a/apps/keymaps/keymap-h1x0_h3x0.c
+++ b/apps/keymaps/keymap-h1x0_h3x0.c
@@ -197,6 +197,17 @@ const struct button_mapping button_context_pitchscreen[] = {
197 LAST_ITEM_IN_LIST 197 LAST_ITEM_IN_LIST
198}; /* button_context_pitchcreen */ 198}; /* button_context_pitchcreen */
199 199
200const struct button_mapping button_context_recscreen[] = {
201 { ACTION_REC_PAUSE, BUTTON_ON, BUTTON_NONE },
202 { ACTION_REC_NEWFILE, BUTTON_REC, BUTTON_NONE },
203 { ACTION_SETTINGS_INC, BUTTON_RIGHT, BUTTON_NONE },
204 { ACTION_SETTINGS_INC, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
205 { ACTION_SETTINGS_DEC, BUTTON_LEFT, BUTTON_NONE },
206 { ACTION_SETTINGS_DEC, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
207
208 LAST_ITEM_IN_LIST
209}; /* button_context_recscreen */
210
200/***************************************************************************** 211/*****************************************************************************
201 * Remote control mappings 212 * Remote control mappings
202 *****************************************************************************/ 213 *****************************************************************************/
@@ -384,7 +395,7 @@ const struct button_mapping button_context_settingsgraphical_h100remote[] = {
384 { ACTION_STD_NEXTREPEAT, BUTTON_RC_BITRATE|BUTTON_REPEAT, BUTTON_NONE }, 395 { ACTION_STD_NEXTREPEAT, BUTTON_RC_BITRATE|BUTTON_REPEAT, BUTTON_NONE },
385 396
386 LAST_ITEM_IN_LIST 397 LAST_ITEM_IN_LIST
387}; 398}; /* button_context_recscreen_h100remote*/
388 399
389const struct button_mapping button_context_settingsgraphical_h300lcdremote[] = { 400const struct button_mapping button_context_settingsgraphical_h300lcdremote[] = {
390 { ACTION_SETTINGS_INC, BUTTON_RC_FF, BUTTON_NONE }, 401 { ACTION_SETTINGS_INC, BUTTON_RC_FF, BUTTON_NONE },
@@ -397,7 +408,7 @@ const struct button_mapping button_context_settingsgraphical_h300lcdremote[] =
397 { ACTION_STD_NEXTREPEAT, BUTTON_RC_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE }, 408 { ACTION_STD_NEXTREPEAT, BUTTON_RC_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE },
398 409
399 LAST_ITEM_IN_LIST 410 LAST_ITEM_IN_LIST
400}; 411}; /* button_context_recscreen_h300lcdremote */
401 412
402const struct button_mapping button_context_yesno_h100remote[] = { 413const struct button_mapping button_context_yesno_h100remote[] = {
403 { ACTION_YESNO_ACCEPT, BUTTON_RC_MENU, BUTTON_NONE }, 414 { ACTION_YESNO_ACCEPT, BUTTON_RC_MENU, BUTTON_NONE },
@@ -477,6 +488,29 @@ const struct button_mapping button_context_pitchscreen_h300lcdremote[] = {
477 LAST_ITEM_IN_LIST 488 LAST_ITEM_IN_LIST
478}; 489};
479 490
491const struct button_mapping button_context_recscreen_h100remote[] = {
492 { ACTION_REC_LCD, BUTTON_RC_VOL_DOWN, BUTTON_NONE },
493 { ACTION_REC_PAUSE, BUTTON_RC_ON, BUTTON_NONE },
494 { ACTION_REC_NEWFILE, BUTTON_RC_REC, BUTTON_NONE },
495 { ACTION_SETTINGS_INC, BUTTON_RC_BITRATE, BUTTON_NONE },
496 { ACTION_SETTINGS_INC, BUTTON_RC_BITRATE|BUTTON_REPEAT, BUTTON_NONE },
497 { ACTION_SETTINGS_DEC, BUTTON_RC_SOURCE, BUTTON_NONE },
498 { ACTION_SETTINGS_DEC, BUTTON_RC_SOURCE|BUTTON_REPEAT, BUTTON_NONE },
499
500 LAST_ITEM_IN_LIST
501};
502
503const struct button_mapping button_context_recscreen_h300lcdremote[] = {
504 { ACTION_REC_LCD, BUTTON_RC_SOURCE, BUTTON_NONE },
505 { ACTION_REC_PAUSE, BUTTON_RC_ON, BUTTON_NONE },
506 { ACTION_REC_NEWFILE, BUTTON_RC_REC, BUTTON_NONE },
507 { ACTION_SETTINGS_INC, BUTTON_RC_FF, BUTTON_NONE },
508 { ACTION_SETTINGS_INC, BUTTON_RC_FF|BUTTON_REPEAT, BUTTON_NONE },
509 { ACTION_SETTINGS_DEC, BUTTON_RC_REW, BUTTON_NONE },
510 { ACTION_SETTINGS_DEC, BUTTON_RC_REW|BUTTON_REPEAT, BUTTON_NONE },
511
512 LAST_ITEM_IN_LIST
513};
480 514
481 515
482/* the actual used tables */ 516/* the actual used tables */
@@ -497,7 +531,9 @@ static const struct button_mapping
497 *remote_btn_ctxt_quickscreen 531 *remote_btn_ctxt_quickscreen
498 = button_context_quickscreen_h100remote, 532 = button_context_quickscreen_h100remote,
499 *remote_btn_ctxt_pitchscreen 533 *remote_btn_ctxt_pitchscreen
500 = button_context_pitchscreen_h100remote; 534 = button_context_pitchscreen_h100remote,
535 *remote_button_ctxt_recscreen
536 = button_context_recscreen_h100remote;
501 537
502static int _remote_type = 0; 538static int _remote_type = 0;
503 539
@@ -519,6 +555,7 @@ static void remap_remote(void)
519 remote_btn_ctxt_bmark = NULL; 555 remote_btn_ctxt_bmark = NULL;
520 remote_btn_ctxt_quickscreen = NULL; 556 remote_btn_ctxt_quickscreen = NULL;
521 remote_btn_ctxt_pitchscreen = NULL; 557 remote_btn_ctxt_pitchscreen = NULL;
558 remote_button_ctxt_recscreen = NULL;
522 break; 559 break;
523 560
524 case REMOTETYPE_H100_LCD: 561 case REMOTETYPE_H100_LCD:
@@ -538,7 +575,9 @@ static void remap_remote(void)
538 remote_btn_ctxt_quickscreen 575 remote_btn_ctxt_quickscreen
539 = button_context_quickscreen_h100remote, 576 = button_context_quickscreen_h100remote,
540 remote_btn_ctxt_pitchscreen 577 remote_btn_ctxt_pitchscreen
541 = button_context_pitchscreen_h100remote; 578 = button_context_pitchscreen_h100remote,
579 remote_button_ctxt_recscreen
580 = button_context_recscreen_h100remote;
542 break; 581 break;
543 582
544 case REMOTETYPE_H300_LCD: 583 case REMOTETYPE_H300_LCD:
@@ -558,7 +597,9 @@ static void remap_remote(void)
558 remote_btn_ctxt_quickscreen 597 remote_btn_ctxt_quickscreen
559 = button_context_quickscreen_h300lcdremote, 598 = button_context_quickscreen_h300lcdremote,
560 remote_btn_ctxt_pitchscreen 599 remote_btn_ctxt_pitchscreen
561 = button_context_pitchscreen_h300lcdremote; 600 = button_context_pitchscreen_h300lcdremote,
601 remote_button_ctxt_recscreen
602 = button_context_recscreen_h300lcdremote;
562 break; 603 break;
563 604
564 case REMOTETYPE_H300_NONLCD: /* FIXME: add its tables */ 605 case REMOTETYPE_H300_NONLCD: /* FIXME: add its tables */
@@ -578,7 +619,9 @@ static void remap_remote(void)
578 remote_btn_ctxt_quickscreen 619 remote_btn_ctxt_quickscreen
579 = button_context_quickscreen_h300lcdremote, 620 = button_context_quickscreen_h300lcdremote,
580 remote_btn_ctxt_pitchscreen 621 remote_btn_ctxt_pitchscreen
581 = button_context_pitchscreen_h300lcdremote; 622 = button_context_pitchscreen_h300lcdremote,
623 remote_button_ctxt_recscreen
624 = button_context_recscreen_h300lcdremote;
582#if 0 625#if 0
583 remote_btn_ctxt_std = 626 remote_btn_ctxt_std =
584 remote_btn_ctxt_wps = 627 remote_btn_ctxt_wps =
@@ -592,6 +635,7 @@ static void remap_remote(void)
592 remote_btn_ctxt_bmark = 635 remote_btn_ctxt_bmark =
593 remote_btn_ctxt_quickscreen = 636 remote_btn_ctxt_quickscreen =
594 remote_btn_ctxt_pitchscreen = 637 remote_btn_ctxt_pitchscreen =
638 remote_button_ctxt_recscreen =
595#endif 639#endif
596 break; 640 break;
597 641
@@ -641,6 +685,8 @@ const struct button_mapping* get_context_mapping_remote(int context)
641 return remote_btn_ctxt_quickscreen; 685 return remote_btn_ctxt_quickscreen;
642 case CONTEXT_PITCHSCREEN: 686 case CONTEXT_PITCHSCREEN:
643 return remote_btn_ctxt_pitchscreen; 687 return remote_btn_ctxt_pitchscreen;
688 case CONTEXT_RECSCREEN:
689 return remote_button_ctxt_recscreen;
644 } 690 }
645 return remote_btn_ctxt_std; 691 return remote_btn_ctxt_std;
646} 692}
@@ -683,6 +729,8 @@ const struct button_mapping* get_context_mapping(int context)
683 return button_context_quickscreen; 729 return button_context_quickscreen;
684 case CONTEXT_PITCHSCREEN: 730 case CONTEXT_PITCHSCREEN:
685 return button_context_pitchscreen; 731 return button_context_pitchscreen;
732 case CONTEXT_RECSCREEN:
733 return button_context_recscreen;
686 } 734 }
687 return button_context_standard; 735 return button_context_standard;
688} 736}