summaryrefslogtreecommitdiff
path: root/apps/keymaps/keymap-e200.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/keymaps/keymap-e200.c')
-rw-r--r--apps/keymaps/keymap-e200.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/apps/keymaps/keymap-e200.c b/apps/keymaps/keymap-e200.c
index c94ae03802..a2017de6f3 100644
--- a/apps/keymaps/keymap-e200.c
+++ b/apps/keymaps/keymap-e200.c
@@ -271,6 +271,23 @@ static const struct button_mapping button_context_bmark[] = {
271 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST), 271 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST),
272}; /* button_context_bmark */ 272}; /* button_context_bmark */
273 273
274#ifdef HAVE_USBSTACK
275static const struct button_mapping button_context_usb_hid[] = {
276 { ACTION_USB_HID_PLAY, BUTTON_UP, BUTTON_NONE },
277 { ACTION_USB_HID_STOP, BUTTON_POWER, BUTTON_NONE },
278 { ACTION_USB_HID_SKIPPREV, BUTTON_LEFT, BUTTON_NONE },
279 { ACTION_USB_HID_SKIPNEXT, BUTTON_RIGHT, BUTTON_NONE },
280 { ACTION_USB_HID_VOLUP, BUTTON_SCROLL_FWD, BUTTON_NONE },
281 { ACTION_USB_HID_VOLUP, BUTTON_SCROLL_FWD|BUTTON_REPEAT, BUTTON_NONE },
282 { ACTION_USB_HID_VOLDOWN, BUTTON_SCROLL_BACK, BUTTON_NONE },
283 { ACTION_USB_HID_VOLDOWN, BUTTON_SCROLL_BACK|BUTTON_REPEAT, BUTTON_NONE },
284 { ACTION_USB_HID_MUTE, BUTTON_SELECT, BUTTON_NONE },
285 { ACTION_USB_HID_MENU, BUTTON_DOWN, BUTTON_NONE },
286
287 LAST_ITEM_IN_LIST
288}; /* button_context_usb_hid */
289#endif
290
274/* get_context_mapping returns a pointer to one of the above defined arrays depending on the context */ 291/* get_context_mapping returns a pointer to one of the above defined arrays depending on the context */
275const struct button_mapping* get_context_mapping(int context) 292const struct button_mapping* get_context_mapping(int context)
276{ 293{
@@ -318,7 +335,10 @@ const struct button_mapping* get_context_mapping(int context)
318 return button_context_recscreen; 335 return button_context_recscreen;
319 case CONTEXT_KEYBOARD: 336 case CONTEXT_KEYBOARD:
320 return button_context_keyboard; 337 return button_context_keyboard;
321 338#ifdef HAVE_USBSTACK
339 case CONTEXT_USB_HID:
340 return button_context_usb_hid;
341#endif
322 default: 342 default:
323 return button_context_standard; 343 return button_context_standard;
324 } 344 }