diff options
Diffstat (limited to 'apps/keymaps/keymap-mr100.c')
-rw-r--r-- | apps/keymaps/keymap-mr100.c | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/apps/keymaps/keymap-mr100.c b/apps/keymaps/keymap-mr100.c index 8b7b74d19b..aff235a480 100644 --- a/apps/keymaps/keymap-mr100.c +++ b/apps/keymaps/keymap-mr100.c | |||
@@ -313,6 +313,37 @@ static const struct button_mapping remote_button_context_tree[] = { | |||
313 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) | 313 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) |
314 | }; | 314 | }; |
315 | 315 | ||
316 | #ifdef HAVE_USBSTACK | ||
317 | static const struct button_mapping button_context_usb_hid[] = { | ||
318 | { ACTION_USB_HID_PLAY, BUTTON_PLAY, BUTTON_NONE }, | ||
319 | { ACTION_USB_HID_STOP, BUTTON_POWER, BUTTON_NONE }, | ||
320 | { ACTION_USB_HID_SKIPPREV, BUTTON_LEFT, BUTTON_NONE }, | ||
321 | { ACTION_USB_HID_SKIPNEXT, BUTTON_RIGHT, BUTTON_NONE }, | ||
322 | { ACTION_USB_HID_VOLUP, BUTTON_UP, BUTTON_NONE }, | ||
323 | { ACTION_USB_HID_VOLUP, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE }, | ||
324 | { ACTION_USB_HID_VOLDOWN, BUTTON_DOWN, BUTTON_NONE }, | ||
325 | { ACTION_USB_HID_VOLDOWN, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE }, | ||
326 | { ACTION_USB_HID_MUTE, BUTTON_SELECT, BUTTON_NONE }, | ||
327 | { ACTION_USB_HID_MENU, BUTTON_MENU, BUTTON_NONE }, | ||
328 | |||
329 | LAST_ITEM_IN_LIST | ||
330 | }; /* button_context_usb_hid */ | ||
331 | |||
332 | static const struct button_mapping remote_button_context_usb_hid[] = { | ||
333 | { ACTION_USB_HID_PLAY, BUTTON_RC_PLAY, BUTTON_NONE }, | ||
334 | { ACTION_USB_HID_STOP, BUTTON_RC_PLAY|BUTTON_REPEAT, BUTTON_NONE }, | ||
335 | { ACTION_USB_HID_SKIPPREV, BUTTON_RC_REW, BUTTON_NONE }, | ||
336 | { ACTION_USB_HID_SKIPNEXT, BUTTON_RC_FF, BUTTON_NONE }, | ||
337 | { ACTION_USB_HID_VOLUP, BUTTON_RC_UP, BUTTON_NONE }, | ||
338 | { ACTION_USB_HID_VOLUP, BUTTON_RC_UP|BUTTON_REPEAT, BUTTON_NONE }, | ||
339 | { ACTION_USB_HID_VOLDOWN, BUTTON_RC_DOWN, BUTTON_NONE }, | ||
340 | { ACTION_USB_HID_VOLDOWN, BUTTON_RC_DOWN|BUTTON_REPEAT, BUTTON_NONE }, | ||
341 | { ACTION_USB_HID_MENU, BUTTON_RC_FAV, BUTTON_NONE }, | ||
342 | |||
343 | LAST_ITEM_IN_LIST | ||
344 | }; /* remote_button_context_usb_hid */ | ||
345 | #endif | ||
346 | |||
316 | static const struct button_mapping* get_context_mapping_remote( int context ) | 347 | static const struct button_mapping* get_context_mapping_remote( int context ) |
317 | { | 348 | { |
318 | context ^= CONTEXT_REMOTE; | 349 | context ^= CONTEXT_REMOTE; |
@@ -324,6 +355,10 @@ static const struct button_mapping* get_context_mapping_remote( int context ) | |||
324 | case CONTEXT_MAINMENU: | 355 | case CONTEXT_MAINMENU: |
325 | case CONTEXT_TREE: | 356 | case CONTEXT_TREE: |
326 | return remote_button_context_tree; | 357 | return remote_button_context_tree; |
358 | #ifdef HAVE_USBSTACK | ||
359 | case CONTEXT_USB_HID: | ||
360 | return remote_button_context_usb_hid; | ||
361 | #endif | ||
327 | } | 362 | } |
328 | return remote_button_context_standard; | 363 | return remote_button_context_standard; |
329 | } | 364 | } |
@@ -374,6 +409,10 @@ const struct button_mapping* get_context_mapping(int context) | |||
374 | return button_context_pitchscreen; | 409 | return button_context_pitchscreen; |
375 | case CONTEXT_KEYBOARD: | 410 | case CONTEXT_KEYBOARD: |
376 | return button_context_keyboard; | 411 | return button_context_keyboard; |
412 | #ifdef HAVE_USBSTACK | ||
413 | case CONTEXT_USB_HID: | ||
414 | return button_context_usb_hid; | ||
415 | #endif | ||
377 | } | 416 | } |
378 | return button_context_standard; | 417 | return button_context_standard; |
379 | } | 418 | } |