Touchscreen keymapping enhancements
- Standard context: make center and mid-right the same (long press to get to context menu) - WPS: Top/Bottom middle controls volume - WPS: Long bottom-left for pitch screen - WPS: Long bottom-right for ID3 screen git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23857 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
2ece18609d
commit
0651fe572b
1 changed files with 24 additions and 14 deletions
|
@ -45,9 +45,9 @@ const struct button_mapping* target_get_context_mapping(int context);
|
||||||
|
|
||||||
/* touchscreen "buttons"
|
/* touchscreen "buttons"
|
||||||
screen is split into a 3x3 grid for buttons...
|
screen is split into a 3x3 grid for buttons...
|
||||||
BUTTON_TOPLEFT BUTTON_TOPMIDDLE BUTTON_TOPRIGHT
|
BUTTON_TOPLEFT BUTTON_TOPMIDDLE BUTTON_TOPRIGHT
|
||||||
BUTTON_MIDLEFT BUTTON_CENTER BUTTON_MIDRIGHT
|
BUTTON_MIDLEFT BUTTON_CENTER BUTTON_MIDRIGHT
|
||||||
BUTTON_BOTTOMLEFT BUTTON_BOTTOMMIDDLE BUTTON_BOTTOMRIGHT
|
BUTTON_BOTTOMLEFT BUTTON_BOTTOMMIDDLE BUTTON_BOTTOMRIGHT
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static const struct button_mapping button_context_standard[] = {
|
static const struct button_mapping button_context_standard[] = {
|
||||||
|
@ -58,34 +58,44 @@ static const struct button_mapping button_context_standard[] = {
|
||||||
|
|
||||||
{ ACTION_STD_OK, BUTTON_CENTER|BUTTON_REL, BUTTON_CENTER },
|
{ ACTION_STD_OK, BUTTON_CENTER|BUTTON_REL, BUTTON_CENTER },
|
||||||
{ ACTION_STD_OK, BUTTON_MIDRIGHT|BUTTON_REL, BUTTON_MIDRIGHT },
|
{ 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_NONE },
|
||||||
{ ACTION_STD_CANCEL, BUTTON_MIDLEFT|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_STD_CANCEL, BUTTON_MIDLEFT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
|
||||||
{ ACTION_STD_MENU, BUTTON_TOPLEFT, BUTTON_NONE },
|
{ ACTION_STD_MENU, BUTTON_TOPLEFT, BUTTON_NONE },
|
||||||
{ ACTION_STD_QUICKSCREEN, BUTTON_TOPLEFT|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_STD_QUICKSCREEN, BUTTON_TOPLEFT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_STD_CONTEXT, BUTTON_CENTER|BUTTON_REPEAT, BUTTON_CENTER },
|
{ ACTION_STD_CONTEXT, BUTTON_CENTER|BUTTON_REPEAT, BUTTON_CENTER },
|
||||||
|
{ ACTION_STD_CONTEXT, BUTTON_MIDRIGHT|BUTTON_REPEAT, BUTTON_MIDRIGHT },
|
||||||
|
|
||||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM2|CONTEXT_STD)
|
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM2|CONTEXT_STD)
|
||||||
}; /* button_context_standard */
|
}; /* button_context_standard */
|
||||||
|
|
||||||
static const struct button_mapping button_context_wps[] = {
|
static const struct button_mapping button_context_wps[] = {
|
||||||
|
|
||||||
{ ACTION_WPS_PLAY, BUTTON_TOPRIGHT|BUTTON_REL, BUTTON_TOPRIGHT },
|
{ ACTION_WPS_PLAY, BUTTON_TOPRIGHT|BUTTON_REL, BUTTON_TOPRIGHT },
|
||||||
{ ACTION_WPS_STOP, BUTTON_TOPRIGHT|BUTTON_REPEAT, BUTTON_TOPRIGHT },
|
{ ACTION_WPS_STOP, BUTTON_TOPRIGHT|BUTTON_REPEAT, BUTTON_TOPRIGHT },
|
||||||
{ ACTION_WPS_SKIPNEXT, BUTTON_MIDRIGHT|BUTTON_REL, BUTTON_MIDRIGHT },
|
|
||||||
{ ACTION_WPS_SKIPPREV, BUTTON_MIDLEFT|BUTTON_REL, BUTTON_MIDLEFT },
|
|
||||||
|
|
||||||
|
{ ACTION_WPS_SKIPPREV, BUTTON_MIDLEFT|BUTTON_REL, BUTTON_MIDLEFT },
|
||||||
{ ACTION_WPS_SEEKBACK, BUTTON_MIDLEFT|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_WPS_SEEKBACK, BUTTON_MIDLEFT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_WPS_SEEKFWD, BUTTON_MIDRIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
|
||||||
{ ACTION_WPS_STOPSEEK, BUTTON_MIDLEFT|BUTTON_REL, BUTTON_MIDLEFT|BUTTON_REPEAT },
|
{ ACTION_WPS_STOPSEEK, BUTTON_MIDLEFT|BUTTON_REL, BUTTON_MIDLEFT|BUTTON_REPEAT },
|
||||||
|
|
||||||
|
{ ACTION_WPS_SKIPNEXT, BUTTON_MIDRIGHT|BUTTON_REL, BUTTON_MIDRIGHT },
|
||||||
|
{ ACTION_WPS_SEEKFWD, BUTTON_MIDRIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_WPS_STOPSEEK, BUTTON_MIDRIGHT|BUTTON_REL, BUTTON_MIDRIGHT|BUTTON_REPEAT },
|
{ ACTION_WPS_STOPSEEK, BUTTON_MIDRIGHT|BUTTON_REL, BUTTON_MIDRIGHT|BUTTON_REPEAT },
|
||||||
|
|
||||||
|
{ ACTION_WPS_VOLUP, BUTTON_TOPMIDDLE, BUTTON_NONE },
|
||||||
|
{ ACTION_WPS_VOLUP, BUTTON_TOPMIDDLE|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
{ ACTION_WPS_VOLDOWN, BUTTON_BOTTOMMIDDLE, BUTTON_NONE },
|
||||||
|
{ ACTION_WPS_VOLDOWN, BUTTON_BOTTOMMIDDLE|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
|
||||||
{ ACTION_WPS_BROWSE, BUTTON_CENTER|BUTTON_REL, BUTTON_CENTER },
|
{ ACTION_WPS_BROWSE, BUTTON_CENTER|BUTTON_REL, BUTTON_CENTER },
|
||||||
{ ACTION_WPS_CONTEXT, BUTTON_CENTER|BUTTON_REPEAT, BUTTON_CENTER },
|
{ ACTION_WPS_CONTEXT, BUTTON_CENTER|BUTTON_REPEAT, BUTTON_CENTER },
|
||||||
|
|
||||||
{ ACTION_WPS_QUICKSCREEN, BUTTON_TOPLEFT|BUTTON_REPEAT, BUTTON_TOPLEFT },
|
{ ACTION_WPS_QUICKSCREEN, BUTTON_TOPLEFT|BUTTON_REPEAT, BUTTON_TOPLEFT },
|
||||||
{ ACTION_WPS_VIEW_PLAYLIST, BUTTON_TOPLEFT|BUTTON_REL, BUTTON_TOPLEFT },
|
{ ACTION_WPS_VIEW_PLAYLIST, BUTTON_TOPLEFT|BUTTON_REL, BUTTON_TOPLEFT },
|
||||||
|
|
||||||
|
{ ACTION_WPS_PITCHSCREEN, BUTTON_BOTTOMLEFT|BUTTON_REPEAT, BUTTON_BOTTOMLEFT },
|
||||||
|
{ ACTION_WPS_ID3SCREEN, BUTTON_BOTTOMRIGHT|BUTTON_REPEAT, BUTTON_BOTTOMRIGHT },
|
||||||
|
|
||||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM2|CONTEXT_WPS)
|
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM2|CONTEXT_WPS)
|
||||||
}; /* button_context_wps */
|
}; /* button_context_wps */
|
||||||
|
|
||||||
|
@ -110,7 +120,7 @@ static const struct button_mapping button_context_list[] = {
|
||||||
|
|
||||||
static const struct button_mapping button_context_tree[] = {
|
static const struct button_mapping button_context_tree[] = {
|
||||||
{ ACTION_TREE_WPS, BUTTON_TOPRIGHT|BUTTON_REL, BUTTON_TOPRIGHT },
|
{ ACTION_TREE_WPS, BUTTON_TOPRIGHT|BUTTON_REL, BUTTON_TOPRIGHT },
|
||||||
|
|
||||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM2|CONTEXT_CUSTOM2|CONTEXT_TREE)
|
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM2|CONTEXT_CUSTOM2|CONTEXT_TREE)
|
||||||
}; /* button_context_tree */
|
}; /* button_context_tree */
|
||||||
|
|
||||||
|
@ -141,7 +151,7 @@ static const struct button_mapping button_context_settings_right_is_inc[] = {
|
||||||
{ ACTION_SETTINGS_DEC, BUTTON_MIDLEFT, BUTTON_NONE },
|
{ ACTION_SETTINGS_DEC, BUTTON_MIDLEFT, BUTTON_NONE },
|
||||||
{ ACTION_SETTINGS_DECREPEAT, BUTTON_MIDLEFT|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_SETTINGS_DECREPEAT, BUTTON_MIDLEFT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_STD_CANCEL, BUTTON_TOPLEFT, BUTTON_NONE },
|
{ ACTION_STD_CANCEL, BUTTON_TOPLEFT, BUTTON_NONE },
|
||||||
|
|
||||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM2|CONTEXT_CUSTOM|CONTEXT_SETTINGS)
|
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM2|CONTEXT_CUSTOM|CONTEXT_SETTINGS)
|
||||||
}; /* button_context_settingsgraphical */
|
}; /* button_context_settingsgraphical */
|
||||||
|
|
||||||
|
@ -218,7 +228,7 @@ static const struct button_mapping button_context_pitchscreen[] = {
|
||||||
static const struct button_mapping button_context_keyboard[] = {
|
static const struct button_mapping button_context_keyboard[] = {
|
||||||
|
|
||||||
{ ACTION_KBD_LEFT, BUTTON_MIDLEFT, BUTTON_NONE },
|
{ ACTION_KBD_LEFT, BUTTON_MIDLEFT, BUTTON_NONE },
|
||||||
{ ACTION_KBD_LEFT, BUTTON_MIDLEFT|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_KBD_LEFT, BUTTON_MIDLEFT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_KBD_RIGHT, BUTTON_MIDRIGHT, BUTTON_NONE },
|
{ ACTION_KBD_RIGHT, BUTTON_MIDRIGHT, BUTTON_NONE },
|
||||||
{ ACTION_KBD_RIGHT, BUTTON_MIDRIGHT|BUTTON_REPEAT, 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_NONE },
|
||||||
|
@ -341,7 +351,7 @@ const struct button_mapping* get_context_mapping(int context)
|
||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
return target_get_context_mapping(context & ~CONTEXT_CUSTOM2);
|
return target_get_context_mapping(context & ~CONTEXT_CUSTOM2);
|
||||||
|
|
||||||
switch (context)
|
switch (context)
|
||||||
{
|
{
|
||||||
case CONTEXT_STD:
|
case CONTEXT_STD:
|
||||||
|
|
Loading…
Reference in a new issue