diff options
Diffstat (limited to 'apps/keymaps/keymap-touchscreen.c')
-rw-r--r-- | apps/keymaps/keymap-touchscreen.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/apps/keymaps/keymap-touchscreen.c b/apps/keymaps/keymap-touchscreen.c index ce5d01c9dc..70009794a5 100644 --- a/apps/keymaps/keymap-touchscreen.c +++ b/apps/keymaps/keymap-touchscreen.c | |||
@@ -245,6 +245,18 @@ static const struct button_mapping button_context_radio[] = { | |||
245 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM2|CONTEXT_FM) | 245 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM2|CONTEXT_FM) |
246 | }; /* button_context_radio */ | 246 | }; /* button_context_radio */ |
247 | 247 | ||
248 | #ifdef HAVE_USBSTACK | ||
249 | static const struct button_mapping button_context_usb_hid[] = { | ||
250 | { ACTION_USB_HID_PLAY, BUTTON_TOPRIGHT, BUTTON_NONE }, | ||
251 | { ACTION_USB_HID_SKIPPREV, BUTTON_MIDLEFT, BUTTON_NONE }, | ||
252 | { ACTION_USB_HID_SKIPNEXT, BUTTON_MIDRIGHT, BUTTON_NONE }, | ||
253 | { ACTION_USB_HID_MUTE, BUTTON_CENTER, BUTTON_NONE }, | ||
254 | { ACTION_USB_HID_MENU, BUTTON_TOPLEFT, BUTTON_NONE }, | ||
255 | |||
256 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM2|CONTEXT_USB_HID) | ||
257 | }; /* button_context_usb_hid */ | ||
258 | #endif | ||
259 | |||
248 | const struct button_mapping* get_context_mapping(int context) | 260 | const struct button_mapping* get_context_mapping(int context) |
249 | { | 261 | { |
250 | if (context & CONTEXT_CUSTOM2 | 262 | if (context & CONTEXT_CUSTOM2 |
@@ -297,6 +309,10 @@ const struct button_mapping* get_context_mapping(int context) | |||
297 | return button_context_pitchscreen; | 309 | return button_context_pitchscreen; |
298 | case CONTEXT_KEYBOARD: | 310 | case CONTEXT_KEYBOARD: |
299 | return button_context_keyboard; | 311 | return button_context_keyboard; |
312 | #ifdef HAVE_USBSTACK | ||
313 | case CONTEXT_USB_HID: | ||
314 | return button_context_usb_hid; | ||
315 | #endif | ||
300 | } | 316 | } |
301 | return button_context_standard; | 317 | return button_context_standard; |
302 | } | 318 | } |