D2/Touchscreen keymap improvements: onscreen keyboard is now usable; PLAY/pause now mapped to TOPRIGHT; Usable defaults in Rockboy.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18529 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Rob Purchase 2008-09-16 08:14:31 +00:00
parent 1a08f46329
commit f08eed6ec5
3 changed files with 45 additions and 8 deletions

View file

@ -137,8 +137,13 @@ static const struct button_mapping button_context_pitchscreen[] = {
}; /* button_context_pitchcreen */
static const struct button_mapping button_context_keyboard[] = {
{ ACTION_KBD_PAGE_FLIP, BUTTON_MENU, BUTTON_NONE },
{ ACTION_KBD_CURSOR_LEFT, BUTTON_MINUS, BUTTON_NONE },
{ ACTION_KBD_CURSOR_LEFT, BUTTON_MINUS|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_KBD_CURSOR_RIGHT, BUTTON_PLUS, BUTTON_NONE },
{ ACTION_KBD_CURSOR_RIGHT, BUTTON_PLUS|BUTTON_REPEAT, BUTTON_NONE },
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
//LAST_ITEM_IN_LIST
}; /* button_context_keyboard */
const struct button_mapping* target_get_context_mapping(int context)

View file

@ -59,17 +59,19 @@ static const struct button_mapping button_context_standard[] = {
{ ACTION_STD_OK, BUTTON_CENTER|BUTTON_REL, BUTTON_CENTER },
{ ACTION_STD_OK, BUTTON_MIDRIGHT|BUTTON_REL, BUTTON_MIDRIGHT },
{ ACTION_STD_OK, BUTTON_MIDRIGHT|BUTTON_REPEAT, BUTTON_MIDRIGHT },
{ ACTION_STD_CANCEL, BUTTON_MIDLEFT, BUTTON_NONE },
{ ACTION_STD_CANCEL, BUTTON_MIDLEFT|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_STD_MENU, BUTTON_TOPLEFT, BUTTON_NONE },
{ ACTION_STD_QUICKSCREEN, BUTTON_TOPLEFT|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_STD_CONTEXT, BUTTON_CENTER|BUTTON_REPEAT, BUTTON_CENTER },
{ ACTION_STD_CANCEL, BUTTON_MIDLEFT, BUTTON_NONE },
{ ACTION_STD_CANCEL, BUTTON_MIDLEFT|BUTTON_REPEAT, BUTTON_NONE },
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM2|CONTEXT_STD)
}; /* button_context_standard */
static const struct button_mapping button_context_wps[] = {
{ ACTION_WPS_PLAY, BUTTON_TOPRIGHT|BUTTON_REL, BUTTON_TOPRIGHT },
{ ACTION_WPS_SKIPNEXT, BUTTON_MIDRIGHT|BUTTON_REL, BUTTON_MIDRIGHT },
{ ACTION_WPS_SKIPPREV, BUTTON_MIDLEFT|BUTTON_REL, BUTTON_MIDLEFT },
@ -78,8 +80,10 @@ static const struct button_mapping button_context_wps[] = {
{ ACTION_WPS_STOPSEEK, BUTTON_MIDLEFT|BUTTON_REL, BUTTON_MIDLEFT|BUTTON_REPEAT },
{ ACTION_WPS_STOPSEEK, BUTTON_MIDRIGHT|BUTTON_REL, BUTTON_MIDRIGHT|BUTTON_REPEAT },
{ ACTION_WPS_BROWSE, BUTTON_CENTER|BUTTON_REL, BUTTON_CENTER },
{ ACTION_WPS_CONTEXT, BUTTON_CENTER|BUTTON_REPEAT, BUTTON_CENTER },
{ ACTION_WPS_QUICKSCREEN, BUTTON_TOPRIGHT|BUTTON_REPEAT, BUTTON_TOPRIGHT },
{ ACTION_WPS_QUICKSCREEN, BUTTON_TOPLEFT|BUTTON_REPEAT, BUTTON_TOPLEFT },
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM2|CONTEXT_WPS)
}; /* button_context_wps */
@ -103,6 +107,8 @@ static const struct button_mapping button_context_list[] = {
}; /* button_context_list */
static const struct button_mapping button_context_tree[] = {
{ ACTION_TREE_WPS, BUTTON_TOPRIGHT|BUTTON_REL, BUTTON_TOPRIGHT },
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM2|CONTEXT_CUSTOM2|CONTEXT_TREE)
}; /* button_context_tree */
@ -136,15 +142,17 @@ static const struct button_mapping button_context_settings_right_is_inc[] = {
{ ACTION_SETTINGS_DECREPEAT, BUTTON_MIDLEFT|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_STD_OK, BUTTON_CENTER, BUTTON_NONE },
{ ACTION_STD_CANCEL, BUTTON_TOPLEFT, BUTTON_NONE },
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM2|CONTEXT_CUSTOM|CONTEXT_SETTINGS)
}; /* button_context_settingsgraphical */
static const struct button_mapping button_context_yesno[] = {
{ ACTION_YESNO_ACCEPT, BUTTON_MIDLEFT, BUTTON_NONE },
{ ACTION_YESNO_ACCEPT, BUTTON_TOPRIGHT, BUTTON_NONE },
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM2|CONTEXT_YESNOSCREEN)
}; /* button_context_settings_yesno */
static const struct button_mapping button_context_colorchooser[] = {
{ ACTION_STD_OK, BUTTON_CENTER|BUTTON_REL, BUTTON_NONE },
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM2|CONTEXT_SETTINGS_COLOURCHOOSER),
}; /* button_context_colorchooser */
@ -193,6 +201,24 @@ static const struct button_mapping button_context_pitchscreen[] = {
static const struct button_mapping button_context_keyboard[] = {
{ ACTION_KBD_LEFT, BUTTON_MIDLEFT, BUTTON_NONE },
{ ACTION_KBD_LEFT, BUTTON_MIDLEFT|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_KBD_RIGHT, BUTTON_MIDRIGHT, BUTTON_NONE },
{ ACTION_KBD_RIGHT, BUTTON_MIDRIGHT|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_KBD_CURSOR_LEFT, BUTTON_TOPLEFT, BUTTON_NONE },
{ ACTION_KBD_CURSOR_LEFT, BUTTON_TOPLEFT|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_KBD_CURSOR_RIGHT, BUTTON_TOPRIGHT, BUTTON_NONE },
{ ACTION_KBD_CURSOR_RIGHT, BUTTON_TOPRIGHT|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_KBD_SELECT, BUTTON_CENTER|BUTTON_REL, BUTTON_NONE },
{ ACTION_KBD_DONE, BUTTON_CENTER|BUTTON_REPEAT, BUTTON_CENTER },
{ ACTION_KBD_ABORT, BUTTON_POWER, BUTTON_NONE },
{ ACTION_KBD_BACKSPACE, BUTTON_BOTTOMLEFT, BUTTON_NONE },
{ ACTION_KBD_BACKSPACE, BUTTON_BOTTOMLEFT|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_KBD_UP, BUTTON_TOPMIDDLE, BUTTON_NONE },
{ ACTION_KBD_UP, BUTTON_TOPMIDDLE|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_KBD_DOWN, BUTTON_BOTTOMMIDDLE, BUTTON_NONE },
{ ACTION_KBD_DOWN, BUTTON_BOTTOMMIDDLE|BUTTON_REPEAT, BUTTON_NONE },
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM2|CONTEXT_KEYBOARD)
}; /* button_context_keyboard */

View file

@ -193,6 +193,7 @@ static void setoptions (void)
options.START=BUTTON_REW;
options.SELECT=BUTTON_NONE;
options.MENU=BUTTON_POWER;
#elif CONFIG_KEYPAD == MROBE500_PAD
options.UP=BUTTON_RC_PLAY;
options.DOWN=BUTTON_RC_DOWN;
@ -204,7 +205,11 @@ static void setoptions (void)
options.START=BUTTON_RC_HEART;
options.SELECT=BUTTON_RC_MODE;
options.MENU=BUTTON_POWER;
#elif CONFIG_KEYPAD == COWOND2_PAD
options.A=BUTTON_PLUS;
options.B=BUTTON_MINUS;
options.MENU=BUTTON_MENU;
#elif CONFIG_KEYPAD == GIGABEAT_S_PAD
options.UP=BUTTON_UP;
@ -222,12 +227,13 @@ static void setoptions (void)
#ifdef HAVE_TOUCHSCREEN
options.UP=BUTTON_TOPMIDDLE;
options.DOWN=BUTTON_BOTTOMMIDDLE;
options.A=BUTTON_MIDLEFT;
options.B=BUTTON_MIDRIGHT;
options.START=BUTTON_TOPRIGHT;
options.SELECT=BUTTON_CENTER;
#if CONFIG_KEYPAD != COWOND2_PAD
options.A=BUTTON_BOTTOMLEFT;
options.B=BUTTON_BOTTOMRIGHT;
options.MENU=BUTTON_TOPLEFT;
#endif
#endif
options.maxskip=4;