summaryrefslogtreecommitdiff
path: root/apps/keymaps
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
parent7847dde8cf00838de8ff75b8398ffbb1921baf8b (diff)
downloadrockbox-c8bd9129bf146c3c0bbacc744ab509709a004fd7.zip
rockbox-c8bd9129bf146c3c0bbacc744ab509709a004fd7.tar.gz
rockbox-c8bd9129bf146c3c0bbacc744ab509709a004fd7.tar.bz2
rockbox-c8bd9129bf146c3c0bbacc744ab509709a004fd7.tar.xz
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')
-rw-r--r--apps/keymaps/keymap-h1x0_h3x0.c60
-rw-r--r--apps/keymaps/keymap-ondio.c12
-rw-r--r--apps/keymaps/keymap-recorder.c15
-rw-r--r--apps/keymaps/keymap-x5.c15
4 files changed, 96 insertions, 6 deletions
diff --git a/apps/keymaps/keymap-h1x0_h3x0.c b/apps/keymaps/keymap-h1x0_h3x0.c
index 5a6f823..969bb9c 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[] = {
LAST_ITEM_IN_LIST
}; /* button_context_pitchcreen */
+const struct button_mapping button_context_recscreen[] = {
+ { ACTION_REC_PAUSE, BUTTON_ON, BUTTON_NONE },
+ { ACTION_REC_NEWFILE, BUTTON_REC, BUTTON_NONE },
+ { ACTION_SETTINGS_INC, BUTTON_RIGHT, BUTTON_NONE },
+ { ACTION_SETTINGS_INC, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
+ { ACTION_SETTINGS_DEC, BUTTON_LEFT, BUTTON_NONE },
+ { ACTION_SETTINGS_DEC, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
+
+ LAST_ITEM_IN_LIST
+}; /* button_context_recscreen */
+
/*****************************************************************************
* Remote control mappings
*****************************************************************************/
@@ -384,7 +395,7 @@ const struct button_mapping button_context_settingsgraphical_h100remote[] = {
{ ACTION_STD_NEXTREPEAT, BUTTON_RC_BITRATE|BUTTON_REPEAT, BUTTON_NONE },
LAST_ITEM_IN_LIST
-};
+}; /* button_context_recscreen_h100remote*/
const struct button_mapping button_context_settingsgraphical_h300lcdremote[] = {
{ ACTION_SETTINGS_INC, BUTTON_RC_FF, BUTTON_NONE },
@@ -397,7 +408,7 @@ const struct button_mapping button_context_settingsgraphical_h300lcdremote[] =
{ ACTION_STD_NEXTREPEAT, BUTTON_RC_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE },
LAST_ITEM_IN_LIST
-};
+}; /* button_context_recscreen_h300lcdremote */
const struct button_mapping button_context_yesno_h100remote[] = {
{ ACTION_YESNO_ACCEPT, BUTTON_RC_MENU, BUTTON_NONE },
@@ -477,6 +488,29 @@ const struct button_mapping button_context_pitchscreen_h300lcdremote[] = {
LAST_ITEM_IN_LIST
};
+const struct button_mapping button_context_recscreen_h100remote[] = {
+ { ACTION_REC_LCD, BUTTON_RC_VOL_DOWN, BUTTON_NONE },
+ { ACTION_REC_PAUSE, BUTTON_RC_ON, BUTTON_NONE },
+ { ACTION_REC_NEWFILE, BUTTON_RC_REC, BUTTON_NONE },
+ { ACTION_SETTINGS_INC, BUTTON_RC_BITRATE, BUTTON_NONE },
+ { ACTION_SETTINGS_INC, BUTTON_RC_BITRATE|BUTTON_REPEAT, BUTTON_NONE },
+ { ACTION_SETTINGS_DEC, BUTTON_RC_SOURCE, BUTTON_NONE },
+ { ACTION_SETTINGS_DEC, BUTTON_RC_SOURCE|BUTTON_REPEAT, BUTTON_NONE },
+
+ LAST_ITEM_IN_LIST
+};
+
+const struct button_mapping button_context_recscreen_h300lcdremote[] = {
+ { ACTION_REC_LCD, BUTTON_RC_SOURCE, BUTTON_NONE },
+ { ACTION_REC_PAUSE, BUTTON_RC_ON, BUTTON_NONE },
+ { ACTION_REC_NEWFILE, BUTTON_RC_REC, BUTTON_NONE },
+ { ACTION_SETTINGS_INC, BUTTON_RC_FF, BUTTON_NONE },
+ { ACTION_SETTINGS_INC, BUTTON_RC_FF|BUTTON_REPEAT, BUTTON_NONE },
+ { ACTION_SETTINGS_DEC, BUTTON_RC_REW, BUTTON_NONE },
+ { ACTION_SETTINGS_DEC, BUTTON_RC_REW|BUTTON_REPEAT, BUTTON_NONE },
+
+ LAST_ITEM_IN_LIST
+};
/* the actual used tables */
@@ -497,7 +531,9 @@ static const struct button_mapping
*remote_btn_ctxt_quickscreen
= button_context_quickscreen_h100remote,
*remote_btn_ctxt_pitchscreen
- = button_context_pitchscreen_h100remote;
+ = button_context_pitchscreen_h100remote,
+ *remote_button_ctxt_recscreen
+ = button_context_recscreen_h100remote;
static int _remote_type = 0;
@@ -519,6 +555,7 @@ static void remap_remote(void)
remote_btn_ctxt_bmark = NULL;
remote_btn_ctxt_quickscreen = NULL;
remote_btn_ctxt_pitchscreen = NULL;
+ remote_button_ctxt_recscreen = NULL;
break;
case REMOTETYPE_H100_LCD:
@@ -538,7 +575,9 @@ static void remap_remote(void)
remote_btn_ctxt_quickscreen
= button_context_quickscreen_h100remote,
remote_btn_ctxt_pitchscreen
- = button_context_pitchscreen_h100remote;
+ = button_context_pitchscreen_h100remote,
+ remote_button_ctxt_recscreen
+ = button_context_recscreen_h100remote;
break;
case REMOTETYPE_H300_LCD:
@@ -558,7 +597,9 @@ static void remap_remote(void)
remote_btn_ctxt_quickscreen
= button_context_quickscreen_h300lcdremote,
remote_btn_ctxt_pitchscreen
- = button_context_pitchscreen_h300lcdremote;
+ = button_context_pitchscreen_h300lcdremote,
+ remote_button_ctxt_recscreen
+ = button_context_recscreen_h300lcdremote;
break;
case REMOTETYPE_H300_NONLCD: /* FIXME: add its tables */
@@ -578,7 +619,9 @@ static void remap_remote(void)
remote_btn_ctxt_quickscreen
= button_context_quickscreen_h300lcdremote,
remote_btn_ctxt_pitchscreen
- = button_context_pitchscreen_h300lcdremote;
+ = button_context_pitchscreen_h300lcdremote,
+ remote_button_ctxt_recscreen
+ = button_context_recscreen_h300lcdremote;
#if 0
remote_btn_ctxt_std =
remote_btn_ctxt_wps =
@@ -592,6 +635,7 @@ static void remap_remote(void)
remote_btn_ctxt_bmark =
remote_btn_ctxt_quickscreen =
remote_btn_ctxt_pitchscreen =
+ remote_button_ctxt_recscreen =
#endif
break;
@@ -641,6 +685,8 @@ const struct button_mapping* get_context_mapping_remote(int context)
return remote_btn_ctxt_quickscreen;
case CONTEXT_PITCHSCREEN:
return remote_btn_ctxt_pitchscreen;
+ case CONTEXT_RECSCREEN:
+ return remote_button_ctxt_recscreen;
}
return remote_btn_ctxt_std;
}
@@ -683,6 +729,8 @@ const struct button_mapping* get_context_mapping(int context)
return button_context_quickscreen;
case CONTEXT_PITCHSCREEN:
return button_context_pitchscreen;
+ case CONTEXT_RECSCREEN:
+ return button_context_recscreen;
}
return button_context_standard;
}
diff --git a/apps/keymaps/keymap-ondio.c b/apps/keymaps/keymap-ondio.c
index 5476268..57bdcc3 100644
--- a/apps/keymaps/keymap-ondio.c
+++ b/apps/keymaps/keymap-ondio.c
@@ -127,6 +127,16 @@ const struct button_mapping button_context_pitchscreen[] = {
LAST_ITEM_IN_LIST
}; /* button_context_quickscreen */
+const struct button_mapping button_context_recscreen[] = {
+ { ACTION_REC_PAUSE, BUTTON_MENU|BUTTON_REL, BUTTON_MENU },
+ { ACTION_SETTINGS_INC, BUTTON_RIGHT, BUTTON_NONE },
+ { ACTION_SETTINGS_INC, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
+ { ACTION_SETTINGS_DEC, BUTTON_LEFT, BUTTON_NONE },
+ { ACTION_SETTINGS_DEC, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
+
+ LAST_ITEM_IN_LIST
+}; /* button_context_recscreen */
+
const struct button_mapping* get_context_mapping( int context )
{
switch( context )
@@ -153,6 +163,8 @@ const struct button_mapping* get_context_mapping( int context )
/* else fall through to CUSTOM|1 */
case CONTEXT_CUSTOM|1:
return button_context_tree;
+ case CONTEXT_RECSCREEN:
+ return button_context_recscreen;
case CONTEXT_LIST:
case CONTEXT_MAINMENU:
diff --git a/apps/keymaps/keymap-recorder.c b/apps/keymaps/keymap-recorder.c
index 8cb6790..72e0407 100644
--- a/apps/keymaps/keymap-recorder.c
+++ b/apps/keymaps/keymap-recorder.c
@@ -143,6 +143,18 @@ static const struct button_mapping button_context_pitchscreen[] = {
LAST_ITEM_IN_LIST
}; /* button_context_pitchcreen */
+const struct button_mapping button_context_recscreen[] = {
+ { ACTION_REC_PAUSE, BUTTON_PLAY, BUTTON_NONE },
+ { ACTION_REC_F2, BUTTON_F2, BUTTON_NONE },
+ { ACTION_REC_F3, BUTTON_F3, BUTTON_NONE },
+ { ACTION_SETTINGS_INC, BUTTON_RIGHT, BUTTON_NONE },
+ { ACTION_SETTINGS_INC, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
+ { ACTION_SETTINGS_DEC, BUTTON_LEFT, BUTTON_NONE },
+ { ACTION_SETTINGS_DEC, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
+
+ LAST_ITEM_IN_LIST
+}; /* button_context_recscreen */
+
/*****************************************************************************
* Remote control mappings
*****************************************************************************/
@@ -212,6 +224,9 @@ const struct button_mapping* get_context_mapping( int context )
case CONTEXT_QUICKSCREEN:
return button_context_quickscreen;
+ case CONTEXT_RECSCREEN:
+ return button_context_recscreen;
+
case CONTEXT_STD:
case CONTEXT_LIST:
case CONTEXT_MAINMENU:
diff --git a/apps/keymaps/keymap-x5.c b/apps/keymaps/keymap-x5.c
index b04932f..3752b35 100644
--- a/apps/keymaps/keymap-x5.c
+++ b/apps/keymaps/keymap-x5.c
@@ -202,6 +202,19 @@ const struct button_mapping remote_button_context_wps[] = {
LAST_ITEM_IN_LIST
};
+const struct button_mapping button_context_recscreen[] = {
+ { ACTION_REC_PAUSE, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY },
+ { ACTION_STD_CANCEL, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_PLAY },
+ { ACTION_REC_NEWFILE, BUTTON_REC|BUTTON_REL, BUTTON_REC },
+ { ACTION_STD_MENU, BUTTON_REC|BUTTON_REPEAT, BUTTON_REC },
+ { ACTION_SETTINGS_INC, BUTTON_RIGHT, BUTTON_NONE },
+ { ACTION_SETTINGS_INC, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
+ { ACTION_SETTINGS_DEC, BUTTON_LEFT, BUTTON_NONE },
+ { ACTION_SETTINGS_DEC, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
+
+ LAST_ITEM_IN_LIST
+}; /* button_context_recscreen */
+
static const struct button_mapping* get_context_mapping_remote( int context )
{
@@ -252,6 +265,8 @@ const struct button_mapping* get_context_mapping( int context )
return button_context_quickscreen;
case CONTEXT_PITCHSCREEN:
return button_context_pitchscreen;
+ case CONTEXT_RECSCREEN:
+ return button_context_recscreen;
case CONTEXT_LIST:
case CONTEXT_MAINMENU:
default: