diff options
Diffstat (limited to 'apps/keymaps/keymap-gigabeat-s.c')
-rw-r--r-- | apps/keymaps/keymap-gigabeat-s.c | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/apps/keymaps/keymap-gigabeat-s.c b/apps/keymaps/keymap-gigabeat-s.c index f431f5fc02..4fc7e8d469 100644 --- a/apps/keymaps/keymap-gigabeat-s.c +++ b/apps/keymaps/keymap-gigabeat-s.c | |||
@@ -464,6 +464,42 @@ static const struct button_mapping remote_button_context_right_is_inc[] = { | |||
464 | LAST_ITEM_IN_LIST | 464 | LAST_ITEM_IN_LIST |
465 | }; /* remote_button_context_right_is_inc */ | 465 | }; /* remote_button_context_right_is_inc */ |
466 | 466 | ||
467 | #ifdef HAVE_USBSTACK | ||
468 | static const struct button_mapping button_context_usb_hid[] = { | ||
469 | { ACTION_USB_HID_PLAY, BUTTON_PLAY, BUTTON_NONE }, | ||
470 | { ACTION_USB_HID_STOP, BUTTON_POWER, BUTTON_NONE }, | ||
471 | { ACTION_USB_HID_SKIPPREV, BUTTON_LEFT, BUTTON_NONE }, | ||
472 | { ACTION_USB_HID_SKIPNEXT, BUTTON_RIGHT, BUTTON_NONE }, | ||
473 | { ACTION_USB_HID_VOLUP, BUTTON_UP, BUTTON_NONE }, | ||
474 | { ACTION_USB_HID_VOLUP, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE }, | ||
475 | { ACTION_USB_HID_VOLUP, BUTTON_VOL_UP, BUTTON_NONE }, | ||
476 | { ACTION_USB_HID_VOLUP, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE }, | ||
477 | { ACTION_USB_HID_VOLDOWN, BUTTON_DOWN, BUTTON_NONE }, | ||
478 | { ACTION_USB_HID_VOLDOWN, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE }, | ||
479 | { ACTION_USB_HID_VOLDOWN, BUTTON_VOL_DOWN, BUTTON_NONE }, | ||
480 | { ACTION_USB_HID_VOLDOWN, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE }, | ||
481 | { ACTION_USB_HID_MUTE, BUTTON_SELECT, BUTTON_NONE }, | ||
482 | { ACTION_USB_HID_MENU, BUTTON_MENU, BUTTON_NONE }, | ||
483 | |||
484 | LAST_ITEM_IN_LIST | ||
485 | }; /* button_context_usb_hid */ | ||
486 | |||
487 | static const struct button_mapping remote_button_context_usb_hid[] = { | ||
488 | { ACTION_USB_HID_PLAY, BUTTON_RC_PLAY, BUTTON_NONE }, | ||
489 | { ACTION_USB_HID_STOP, BUTTON_RC_POWER, BUTTON_NONE }, | ||
490 | { ACTION_USB_HID_SKIPPREV, BUTTON_RC_REW, BUTTON_NONE }, | ||
491 | { ACTION_USB_HID_SKIPNEXT, BUTTON_RC_FF, BUTTON_NONE }, | ||
492 | { ACTION_USB_HID_VOLUP, BUTTON_RC_VOL_UP, BUTTON_NONE }, | ||
493 | { ACTION_USB_HID_VOLUP, BUTTON_RC_VOL_UP|BUTTON_REPEAT, BUTTON_NONE }, | ||
494 | { ACTION_USB_HID_VOLDOWN, BUTTON_RC_VOL_DOWN, BUTTON_NONE }, | ||
495 | { ACTION_USB_HID_VOLDOWN, BUTTON_RC_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE }, | ||
496 | { ACTION_USB_HID_MUTE, BUTTON_RC_DSP|BUTTON_REPEAT, BUTTON_NONE }, | ||
497 | { ACTION_USB_HID_MENU, BUTTON_RC_DSP, BUTTON_NONE }, | ||
498 | |||
499 | LAST_ITEM_IN_LIST | ||
500 | }; /* remote_button_context_usb_hid */ | ||
501 | #endif | ||
502 | |||
467 | static const struct button_mapping* get_context_mapping_remote( int context ) | 503 | static const struct button_mapping* get_context_mapping_remote( int context ) |
468 | { | 504 | { |
469 | context &= ~CONTEXT_REMOTE; | 505 | context &= ~CONTEXT_REMOTE; |
@@ -506,6 +542,10 @@ static const struct button_mapping* get_context_mapping_remote( int context ) | |||
506 | case CONTEXT_FM: | 542 | case CONTEXT_FM: |
507 | return remote_button_context_radio; | 543 | return remote_button_context_radio; |
508 | 544 | ||
545 | #ifdef HAVE_USBSTACK | ||
546 | case CONTEXT_USB_HID: | ||
547 | return remote_button_context_usb_hid; | ||
548 | #endif | ||
509 | default: | 549 | default: |
510 | return remote_button_context_standard; | 550 | return remote_button_context_standard; |
511 | } | 551 | } |
@@ -573,6 +613,10 @@ const struct button_mapping* get_context_mapping(int context) | |||
573 | case CONTEXT_FM: | 613 | case CONTEXT_FM: |
574 | return button_context_radio; | 614 | return button_context_radio; |
575 | 615 | ||
616 | #ifdef HAVE_USBSTACK | ||
617 | case CONTEXT_USB_HID: | ||
618 | return button_context_usb_hid; | ||
619 | #endif | ||
576 | default: | 620 | default: |
577 | return button_context_standard; | 621 | return button_context_standard; |
578 | } | 622 | } |