forked from len0rd/rockbox
sonynwz: rework keymap based on lebellium's work and enable volume in list
Change-Id: Ieb015e78d1c0aa74c61591e442bfdf5f883f3811
This commit is contained in:
parent
1ef7b6529e
commit
262479173b
2 changed files with 65 additions and 49 deletions
|
|
@ -52,10 +52,11 @@ static const struct button_mapping button_context_standard[] = {
|
|||
}; /* button_context_standard */
|
||||
|
||||
static const struct button_mapping button_context_wps[] = {
|
||||
{ ACTION_WPS_PLAY, BUTTON_POWER|BUTTON_REL, BUTTON_POWER },
|
||||
{ ACTION_WPS_STOP, BUTTON_POWER|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_WPS_PLAY, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY },
|
||||
{ ACTION_WPS_STOP, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_NONE },
|
||||
|
||||
{ ACTION_WPS_CONTEXT, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_WPS_QUICKSCREEN, BUTTON_POWER|BUTTON_REL, BUTTON_POWER },
|
||||
{ ACTION_WPS_CONTEXT, BUTTON_POWER|BUTTON_REPEAT, BUTTON_NONE },
|
||||
|
||||
{ ACTION_WPS_SKIPNEXT, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT },
|
||||
{ ACTION_WPS_SEEKFWD, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
||||
|
|
@ -64,14 +65,21 @@ static const struct button_mapping button_context_wps[] = {
|
|||
{ ACTION_WPS_STOPSEEK, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT|BUTTON_REPEAT },
|
||||
{ ACTION_WPS_STOPSEEK, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT|BUTTON_REPEAT },
|
||||
|
||||
{ ACTION_WPS_VOLUP, BUTTON_UP, BUTTON_NONE },
|
||||
/* only compiled if there is a Volume UP button defined */
|
||||
#ifdef BUTTON_VOL_UP
|
||||
{ ACTION_WPS_VOLUP, BUTTON_VOL_UP, BUTTON_NONE },
|
||||
{ ACTION_WPS_VOLUP, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_WPS_VOLDOWN, BUTTON_VOL_DOWN, BUTTON_NONE },
|
||||
{ ACTION_WPS_VOLDOWN, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
||||
#endif
|
||||
|
||||
{ ACTION_WPS_VOLUP, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||
|
||||
{ ACTION_WPS_VOLDOWN, BUTTON_DOWN, BUTTON_NONE },
|
||||
{ ACTION_WPS_VOLUP, BUTTON_UP, BUTTON_NONE },
|
||||
{ ACTION_WPS_VOLDOWN, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_WPS_VOLDOWN, BUTTON_DOWN, BUTTON_NONE },
|
||||
|
||||
{ ACTION_WPS_MENU, BUTTON_BACK, BUTTON_NONE },
|
||||
{ ACTION_WPS_BROWSE, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY },
|
||||
{ ACTION_WPS_MENU, BUTTON_BACK|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_WPS_BROWSE, BUTTON_BACK|BUTTON_REL, BUTTON_BACK },
|
||||
|
||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
|
||||
}; /* button_context_wps */
|
||||
|
|
@ -115,6 +123,12 @@ static const struct button_mapping button_context_tree[] = {
|
|||
}; /* button_context_tree */
|
||||
|
||||
static const struct button_mapping button_context_list[] = {
|
||||
#ifdef HAVE_VOLUME_IN_LIST
|
||||
{ ACTION_LIST_VOLUP, BUTTON_VOL_UP, BUTTON_NONE },
|
||||
{ ACTION_LIST_VOLUP, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_LIST_VOLDOWN, BUTTON_VOL_DOWN, BUTTON_NONE },
|
||||
{ ACTION_LIST_VOLDOWN, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
||||
#endif
|
||||
|
||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
|
||||
}; /* button_context_list */
|
||||
|
|
@ -122,11 +136,11 @@ static const struct button_mapping button_context_list[] = {
|
|||
#ifdef CONFIG_TUNER
|
||||
static const struct button_mapping button_context_radio[] = {
|
||||
|
||||
{ ACTION_FM_MODE, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY },
|
||||
{ ACTION_FM_MENU, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_FM_MODE, BUTTON_POWER|BUTTON_REL, BUTTON_POWER },
|
||||
{ ACTION_FM_MENU, BUTTON_POWER|BUTTON_REPEAT, BUTTON_NONE },
|
||||
|
||||
{ ACTION_FM_PLAY, BUTTON_POWER|BUTTON_REL, BUTTON_POWER },
|
||||
{ ACTION_FM_STOP, BUTTON_POWER|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_FM_PLAY, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY },
|
||||
{ ACTION_FM_STOP, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_NONE },
|
||||
|
||||
{ ACTION_FM_EXIT, BUTTON_BACK, BUTTON_NONE },
|
||||
|
||||
|
|
@ -137,7 +151,7 @@ static const struct button_mapping button_context_radio[] = {
|
|||
#ifdef HAVE_RECORDING
|
||||
static const struct button_mapping button_context_recscreen[] = {
|
||||
|
||||
{ ACTION_REC_PAUSE, BUTTON_POWER, BUTTON_NONE },
|
||||
{ ACTION_REC_PAUSE, BUTTON_PLAY, BUTTON_NONE },
|
||||
{ ACTION_SETTINGS_INC, BUTTON_RIGHT, BUTTON_NONE },
|
||||
{ ACTION_SETTINGS_INCREPEAT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_SETTINGS_DEC, BUTTON_LEFT, BUTTON_NONE },
|
||||
|
|
@ -183,7 +197,7 @@ static const struct button_mapping button_context_settings_right_is_inc[] = {
|
|||
static const struct button_mapping button_context_time[] = {
|
||||
|
||||
{ ACTION_STD_CANCEL, BUTTON_BACK, BUTTON_NONE },
|
||||
{ ACTION_STD_OK, BUTTON_POWER, BUTTON_NONE },
|
||||
{ ACTION_STD_OK, BUTTON_PLAY, BUTTON_NONE },
|
||||
|
||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS)
|
||||
}; /* button_context_time */
|
||||
|
|
@ -255,7 +269,6 @@ static const struct button_mapping button_context_usb_hid_mode_multimedia[] = {
|
|||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_USB_HID)
|
||||
}; /* button_context_usb_hid_mode_multimedia */
|
||||
|
||||
|
||||
static const struct button_mapping button_context_usb_hid_mode_presentation[] = {
|
||||
{ ACTION_USB_HID_PRESENTATION_SLIDESHOW_START, BUTTON_POWER|BUTTON_REL, BUTTON_POWER },
|
||||
{ ACTION_USB_HID_PRESENTATION_SLIDESHOW_LEAVE, BUTTON_POWER|BUTTON_REPEAT, BUTTON_POWER },
|
||||
|
|
|
|||
|
|
@ -40,6 +40,9 @@
|
|||
/* define this if you would like tagcache to build on this target */
|
||||
#define HAVE_TAGCACHE
|
||||
|
||||
/* define this if the target has volume keys which can be used in the lists */
|
||||
#define HAVE_VOLUME_IN_LIST
|
||||
|
||||
/* define this if you have LCD enable function */
|
||||
#define HAVE_LCD_ENABLE
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue