summaryrefslogtreecommitdiff
path: root/apps/keymaps/keymap-c100.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/keymaps/keymap-c100.c')
-rw-r--r--apps/keymaps/keymap-c100.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/apps/keymaps/keymap-c100.c b/apps/keymaps/keymap-c100.c
index 70cb17ae1a..087be8665f 100644
--- a/apps/keymaps/keymap-c100.c
+++ b/apps/keymaps/keymap-c100.c
@@ -269,6 +269,19 @@ static const struct button_mapping button_context_bmark[] = {
269 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST), 269 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST),
270}; /* button_context_bmark */ 270}; /* button_context_bmark */
271 271
272#ifdef HAVE_USBSTACK
273static const struct button_mapping button_context_usb_hid[] = {
274 { ACTION_USB_HID_PLAY, BUTTON_VOLUP, BUTTON_NONE },
275 { ACTION_USB_HID_STOP, BUTTON_VOLUP|BUTTON_REPEAT, BUTTON_NONE },
276 { ACTION_USB_HID_SKIPPREV, BUTTON_LEFT, BUTTON_NONE },
277 { ACTION_USB_HID_SKIPNEXT, BUTTON_RIGHT, BUTTON_NONE },
278 { ACTION_USB_HID_MUTE, BUTTON_VOLDOWN, BUTTON_NONE },
279 { ACTION_USB_HID_MENU, BUTTON_MENU, BUTTON_NONE },
280
281 LAST_ITEM_IN_LIST
282}; /* button_context_usb_hid */
283#endif
284
272/* get_context_mapping returns a pointer to one of the above defined arrays depending on the context */ 285/* get_context_mapping returns a pointer to one of the above defined arrays depending on the context */
273const struct button_mapping* get_context_mapping(int context) 286const struct button_mapping* get_context_mapping(int context)
274{ 287{
@@ -317,7 +330,10 @@ const struct button_mapping* get_context_mapping(int context)
317#endif 330#endif
318 case CONTEXT_KEYBOARD: 331 case CONTEXT_KEYBOARD:
319 return button_context_keyboard; 332 return button_context_keyboard;
320 333#ifdef HAVE_USBSTACK
334 case CONTEXT_USB_HID:
335 return button_context_usb_hid;
336#endif
321 default: 337 default:
322 return button_context_standard; 338 return button_context_standard;
323 } 339 }