diff options
Diffstat (limited to 'apps/keymaps/keymap-c200.c')
-rw-r--r-- | apps/keymaps/keymap-c200.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/apps/keymaps/keymap-c200.c b/apps/keymaps/keymap-c200.c index 430ca50e59..56504584f8 100644 --- a/apps/keymaps/keymap-c200.c +++ b/apps/keymaps/keymap-c200.c | |||
@@ -281,6 +281,23 @@ static const struct button_mapping button_context_bmark[] = { | |||
281 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST), | 281 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST), |
282 | }; /* button_context_bmark */ | 282 | }; /* button_context_bmark */ |
283 | 283 | ||
284 | #ifdef HAVE_USBSTACK | ||
285 | static const struct button_mapping button_context_usb_hid[] = { | ||
286 | { ACTION_USB_HID_PLAY, BUTTON_UP, BUTTON_NONE }, | ||
287 | { ACTION_USB_HID_STOP, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE }, | ||
288 | { ACTION_USB_HID_SKIPPREV, BUTTON_LEFT, BUTTON_NONE }, | ||
289 | { ACTION_USB_HID_SKIPNEXT, BUTTON_RIGHT, BUTTON_NONE }, | ||
290 | { ACTION_USB_HID_VOLUP, BUTTON_VOL_UP, BUTTON_NONE }, | ||
291 | { ACTION_USB_HID_VOLUP, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE }, | ||
292 | { ACTION_USB_HID_VOLDOWN, BUTTON_VOL_DOWN, BUTTON_NONE }, | ||
293 | { ACTION_USB_HID_VOLDOWN, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE }, | ||
294 | { ACTION_USB_HID_MUTE, BUTTON_DOWN, BUTTON_NONE }, | ||
295 | { ACTION_USB_HID_MENU, BUTTON_POWER, BUTTON_NONE }, | ||
296 | |||
297 | LAST_ITEM_IN_LIST | ||
298 | }; /* button_context_usb_hid */ | ||
299 | #endif | ||
300 | |||
284 | /* get_context_mapping returns a pointer to one of the above defined arrays depending on the context */ | 301 | /* get_context_mapping returns a pointer to one of the above defined arrays depending on the context */ |
285 | const struct button_mapping* get_context_mapping(int context) | 302 | const struct button_mapping* get_context_mapping(int context) |
286 | { | 303 | { |
@@ -330,7 +347,10 @@ const struct button_mapping* get_context_mapping(int context) | |||
330 | #endif | 347 | #endif |
331 | case CONTEXT_KEYBOARD: | 348 | case CONTEXT_KEYBOARD: |
332 | return button_context_keyboard; | 349 | return button_context_keyboard; |
333 | 350 | #ifdef HAVE_USBSTACK | |
351 | case CONTEXT_USB_HID: | ||
352 | return button_context_usb_hid; | ||
353 | #endif | ||
334 | default: | 354 | default: |
335 | return button_context_standard; | 355 | return button_context_standard; |
336 | } | 356 | } |