diff options
Diffstat (limited to 'apps/keymaps/keymap-h10.c')
-rw-r--r-- | apps/keymaps/keymap-h10.c | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/apps/keymaps/keymap-h10.c b/apps/keymaps/keymap-h10.c index 9afca4e61c..77247d35d8 100644 --- a/apps/keymaps/keymap-h10.c +++ b/apps/keymaps/keymap-h10.c | |||
@@ -332,6 +332,61 @@ static const struct button_mapping button_context_radio[] = { | |||
332 | 332 | ||
333 | }; | 333 | }; |
334 | 334 | ||
335 | |||
336 | |||
337 | |||
338 | |||
339 | |||
340 | static const struct button_mapping remote_button_context_wps[] = { | ||
341 | { ACTION_WPS_PLAY, BUTTON_RC_PLAY|BUTTON_REL, BUTTON_RC_PLAY }, | ||
342 | { ACTION_WPS_STOP, BUTTON_RC_PLAY|BUTTON_REPEAT,BUTTON_RC_PLAY }, | ||
343 | { ACTION_WPS_SKIPPREV, BUTTON_RC_REW|BUTTON_REL, BUTTON_RC_REW}, | ||
344 | { ACTION_WPS_SEEKBACK, BUTTON_RC_REW|BUTTON_REPEAT, BUTTON_NONE }, | ||
345 | { ACTION_WPS_STOPSEEK, BUTTON_RC_REW|BUTTON_REL, BUTTON_RC_REW|BUTTON_REPEAT }, | ||
346 | { ACTION_WPS_SKIPNEXT, BUTTON_RC_FF|BUTTON_REL, BUTTON_RC_FF }, | ||
347 | { ACTION_WPS_SEEKFWD, BUTTON_RC_FF|BUTTON_REPEAT, BUTTON_NONE }, | ||
348 | { ACTION_WPS_STOPSEEK, BUTTON_RC_FF|BUTTON_REL, BUTTON_RC_FF|BUTTON_REPEAT }, | ||
349 | |||
350 | { ACTION_WPS_VOLDOWN, BUTTON_RC_VOL_DOWN, BUTTON_NONE }, | ||
351 | { ACTION_WPS_VOLDOWN, BUTTON_RC_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE }, | ||
352 | { ACTION_WPS_VOLUP, BUTTON_RC_VOL_UP, BUTTON_NONE }, | ||
353 | { ACTION_WPS_VOLUP, BUTTON_RC_VOL_UP|BUTTON_REPEAT, BUTTON_NONE }, | ||
354 | |||
355 | { ACTION_WPS_PITCHSCREEN, BUTTON_RC_PLAY|BUTTON_LEFT, BUTTON_RC_PLAY }, | ||
356 | { ACTION_WPS_ID3SCREEN, BUTTON_RC_PLAY|BUTTON_RIGHT, BUTTON_RC_PLAY }, | ||
357 | |||
358 | LAST_ITEM_IN_LIST | ||
359 | }; /* remote_button_context_wps */ | ||
360 | |||
361 | #ifdef HAVE_USBSTACK | ||
362 | static const struct button_mapping button_context_usb_hid[] = { | ||
363 | { ACTION_USB_HID_PLAY, BUTTON_PLAY, BUTTON_NONE }, | ||
364 | { ACTION_USB_HID_STOP, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_NONE }, | ||
365 | { ACTION_USB_HID_SKIPPREV, BUTTON_REW, BUTTON_NONE }, | ||
366 | { ACTION_USB_HID_SKIPNEXT, BUTTON_FF, BUTTON_NONE }, | ||
367 | { ACTION_USB_HID_VOLUP, BUTTON_SCROLL_UP, BUTTON_NONE }, | ||
368 | { ACTION_USB_HID_VOLUP, BUTTON_SCROLL_UP|BUTTON_REPEAT, BUTTON_NONE }, | ||
369 | { ACTION_USB_HID_VOLDOWN, BUTTON_SCROLL_DOWN, BUTTON_NONE }, | ||
370 | { ACTION_USB_HID_VOLDOWN, BUTTON_SCROLL_DOWN|BUTTON_REPEAT, BUTTON_NONE }, | ||
371 | { ACTION_USB_HID_MENU, BUTTON_POWER, BUTTON_NONE }, | ||
372 | |||
373 | LAST_ITEM_IN_LIST | ||
374 | }; /* button_context_usb_hid */ | ||
375 | |||
376 | static const struct button_mapping remote_button_context_usb_hid[] = { | ||
377 | { ACTION_USB_HID_PLAY, BUTTON_RC_PLAY, BUTTON_NONE }, | ||
378 | { ACTION_USB_HID_STOP, BUTTON_RC_PLAY|BUTTON_REPEAT, BUTTON_NONE }, | ||
379 | { ACTION_USB_HID_SKIPPREV, BUTTON_RC_REW, BUTTON_NONE }, | ||
380 | { ACTION_USB_HID_SKIPNEXT, BUTTON_RC_FF, BUTTON_NONE }, | ||
381 | { ACTION_USB_HID_VOLUP, BUTTON_RC_SCROLL_UP, BUTTON_NONE }, | ||
382 | { ACTION_USB_HID_VOLUP, BUTTON_RC_SCROLL_UP|BUTTON_REPEAT, BUTTON_NONE }, | ||
383 | { ACTION_USB_HID_VOLDOWN, BUTTON_RC_SCROLL_DOWN, BUTTON_NONE }, | ||
384 | { ACTION_USB_HID_VOLDOWN, BUTTON_RC_SCROLL_DOWN|BUTTON_REPEAT, BUTTON_NONE }, | ||
385 | |||
386 | LAST_ITEM_IN_LIST | ||
387 | }; /* remote_button_context_usb_hid */ | ||
388 | #endif | ||
389 | |||
335 | static const struct button_mapping* get_context_mapping_remote( int context ) | 390 | static const struct button_mapping* get_context_mapping_remote( int context ) |
336 | { | 391 | { |
337 | context ^= CONTEXT_REMOTE; | 392 | context ^= CONTEXT_REMOTE; |
@@ -361,6 +416,10 @@ static const struct button_mapping* get_context_mapping_remote( int context ) | |||
361 | return remote_button_context_pitchscreen; | 416 | return remote_button_context_pitchscreen; |
362 | case CONTEXT_RECSCREEN: | 417 | case CONTEXT_RECSCREEN: |
363 | return button_context_recscreen; | 418 | return button_context_recscreen; |
419 | #ifdef HAVE_USBSTACK | ||
420 | case CONTEXT_USB_HID: | ||
421 | return remote_button_context_usb_hid; | ||
422 | #endif | ||
364 | 423 | ||
365 | default: | 424 | default: |
366 | return remote_button_context_standard; | 425 | return remote_button_context_standard; |
@@ -415,6 +474,10 @@ const struct button_mapping* get_context_mapping(int context) | |||
415 | return button_context_recscreen; | 474 | return button_context_recscreen; |
416 | case CONTEXT_FM: | 475 | case CONTEXT_FM: |
417 | return button_context_radio; | 476 | return button_context_radio; |
477 | #ifdef HAVE_USBSTACK | ||
478 | case CONTEXT_USB_HID: | ||
479 | return button_context_usb_hid; | ||
480 | #endif | ||
418 | default: | 481 | default: |
419 | return button_context_standard; | 482 | return button_context_standard; |
420 | } | 483 | } |