diff options
Diffstat (limited to 'apps/keymaps/keymap-sa9200.c')
-rw-r--r-- | apps/keymaps/keymap-sa9200.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/apps/keymaps/keymap-sa9200.c b/apps/keymaps/keymap-sa9200.c index 478eea3bfe..3091ec6156 100644 --- a/apps/keymaps/keymap-sa9200.c +++ b/apps/keymaps/keymap-sa9200.c | |||
@@ -269,6 +269,27 @@ static const struct button_mapping button_context_keyboard[] = { | |||
269 | LAST_ITEM_IN_LIST | 269 | LAST_ITEM_IN_LIST |
270 | }; /* button_context_keyboard */ | 270 | }; /* button_context_keyboard */ |
271 | 271 | ||
272 | #ifdef HAVE_USBSTACK | ||
273 | static const struct button_mapping button_context_usb_hid[] = { | ||
274 | { ACTION_USB_HID_PLAY, BUTTON_RIGHT, BUTTON_NONE }, | ||
275 | { ACTION_USB_HID_STOP, BUTTON_POWER, BUTTON_NONE }, | ||
276 | { ACTION_USB_HID_SKIPPREV, BUTTON_REW, BUTTON_NONE }, | ||
277 | { ACTION_USB_HID_SKIPNEXT, BUTTON_FFWD, BUTTON_NONE }, | ||
278 | { ACTION_USB_HID_VOLUP, BUTTON_UP, BUTTON_NONE }, | ||
279 | { ACTION_USB_HID_VOLUP, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE }, | ||
280 | { ACTION_USB_HID_VOLUP, BUTTON_VOL_UP, BUTTON_NONE }, | ||
281 | { ACTION_USB_HID_VOLUP, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE }, | ||
282 | { ACTION_USB_HID_VOLDOWN, BUTTON_DOWN, BUTTON_NONE }, | ||
283 | { ACTION_USB_HID_VOLDOWN, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE }, | ||
284 | { ACTION_USB_HID_VOLDOWN, BUTTON_VOL_DOWN, BUTTON_NONE }, | ||
285 | { ACTION_USB_HID_VOLDOWN, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE }, | ||
286 | { ACTION_USB_HID_MUTE, BUTTON_SELECT, BUTTON_NONE }, | ||
287 | { ACTION_USB_HID_MENU, BUTTON_MENU, BUTTON_NONE }, | ||
288 | |||
289 | LAST_ITEM_IN_LIST | ||
290 | }; /* button_context_usb_hid */ | ||
291 | #endif | ||
292 | |||
272 | const struct button_mapping* get_context_mapping(int context) | 293 | const struct button_mapping* get_context_mapping(int context) |
273 | { | 294 | { |
274 | switch (context) | 295 | switch (context) |
@@ -312,6 +333,10 @@ const struct button_mapping* get_context_mapping(int context) | |||
312 | return button_context_pitchscreen; | 333 | return button_context_pitchscreen; |
313 | case CONTEXT_KEYBOARD: | 334 | case CONTEXT_KEYBOARD: |
314 | return button_context_keyboard; | 335 | return button_context_keyboard; |
336 | #ifdef HAVE_USBSTACK | ||
337 | case CONTEXT_USB_HID: | ||
338 | return button_context_usb_hid; | ||
339 | #endif | ||
315 | } | 340 | } |
316 | return button_context_standard; | 341 | return button_context_standard; |
317 | } | 342 | } |