diff options
Diffstat (limited to 'apps/keymaps/keymap-clip.c')
-rw-r--r-- | apps/keymaps/keymap-clip.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/apps/keymaps/keymap-clip.c b/apps/keymaps/keymap-clip.c index e1d31cb398..4b778beeb7 100644 --- a/apps/keymaps/keymap-clip.c +++ b/apps/keymaps/keymap-clip.c | |||
@@ -265,6 +265,23 @@ static const struct button_mapping button_context_bmark[] = { | |||
265 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST), | 265 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST), |
266 | }; /* button_context_bmark */ | 266 | }; /* button_context_bmark */ |
267 | 267 | ||
268 | #ifdef HAVE_USBSTACK | ||
269 | static const struct button_mapping button_context_usb_hid[] = { | ||
270 | { ACTION_USB_HID_PLAY, BUTTON_UP, BUTTON_NONE }, | ||
271 | { ACTION_USB_HID_STOP, BUTTON_POWER, BUTTON_NONE }, | ||
272 | { ACTION_USB_HID_SKIPPREV, BUTTON_LEFT, BUTTON_NONE }, | ||
273 | { ACTION_USB_HID_SKIPNEXT, BUTTON_RIGHT, BUTTON_NONE }, | ||
274 | { ACTION_USB_HID_VOLUP, BUTTON_VOL_UP, BUTTON_NONE }, | ||
275 | { ACTION_USB_HID_VOLUP, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE }, | ||
276 | { ACTION_USB_HID_VOLDOWN, BUTTON_VOL_DOWN, BUTTON_NONE }, | ||
277 | { ACTION_USB_HID_VOLDOWN, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE }, | ||
278 | { ACTION_USB_HID_MUTE, BUTTON_SELECT, BUTTON_NONE }, | ||
279 | { ACTION_USB_HID_MENU, BUTTON_DOWN, BUTTON_NONE }, | ||
280 | |||
281 | LAST_ITEM_IN_LIST | ||
282 | }; /* button_context_usb_hid */ | ||
283 | #endif | ||
284 | |||
268 | /* 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 */ |
269 | const struct button_mapping* get_context_mapping(int context) | 286 | const struct button_mapping* get_context_mapping(int context) |
270 | { | 287 | { |
@@ -310,7 +327,10 @@ const struct button_mapping* get_context_mapping(int context) | |||
310 | return button_context_recscreen; | 327 | return button_context_recscreen; |
311 | case CONTEXT_KEYBOARD: | 328 | case CONTEXT_KEYBOARD: |
312 | return button_context_keyboard; | 329 | return button_context_keyboard; |
313 | 330 | #ifdef HAVE_USBSTACK | |
331 | case CONTEXT_USB_HID: | ||
332 | return button_context_usb_hid; | ||
333 | #endif | ||
314 | default: | 334 | default: |
315 | return button_context_standard; | 335 | return button_context_standard; |
316 | } | 336 | } |