summaryrefslogtreecommitdiffstats
path: root/apps/action.h
diff options
context:
space:
mode:
authorTomer Shalev <shalev.tomer@gmail.com>2009-10-17 05:39:54 +0000
committerTomer Shalev <shalev.tomer@gmail.com>2009-10-17 05:39:54 +0000
commit4f3d7b5bcb0b025332e128c3856aa9d4cce91898 (patch)
treeac2f783e9585c476fbaa9dfaf3a7a34e826f7ccc /apps/action.h
parent6d4d44caf69e06ea51937da9c74e78af0ac99a62 (diff)
downloadrockbox-4f3d7b5bcb0b025332e128c3856aa9d4cce91898.tar.gz
rockbox-4f3d7b5bcb0b025332e128c3856aa9d4cce91898.tar.bz2
rockbox-4f3d7b5bcb0b025332e128c3856aa9d4cce91898.zip
USB HID: Use different context for each mode; Use constant for each action;
Rework keymaps This commit makes the code neater and more readable. It makes it easier to modify keymap assignments and new keypad modes. Some platforms had their keypad mappings reworked. The manual is updated to reflect all these changes. H10 remote control mapping dropped. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23219 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/action.h')
-rw-r--r--apps/action.h56
1 files changed, 39 insertions, 17 deletions
diff --git a/apps/action.h b/apps/action.h
index 8d8e8f50fd..0738b114da 100644
--- a/apps/action.h
+++ b/apps/action.h
@@ -77,7 +77,10 @@ enum {
CONTEXT_KEYBOARD,
CONTEXT_FM,
CONTEXT_USB_HID,
- CONTEXT_USB_HID_MOUSE,
+ CONTEXT_USB_HID_MODE_MULTIMEDIA,
+ CONTEXT_USB_HID_MODE_PRESENTATION,
+ CONTEXT_USB_HID_MODE_BROWSER,
+ CONTEXT_USB_HID_MODE_MOUSE,
};
@@ -244,22 +247,41 @@ enum {
/* USB HID codes */
ACTION_USB_HID_FIRST, /* Place holder */
- ACTION_USB_HID_DEC,
- ACTION_USB_HID_INC,
- ACTION_USB_HID_START,
- ACTION_USB_HID_START_LONG,
- ACTION_USB_HID_QUIT,
- ACTION_USB_HID_QUIT_LONG,
- ACTION_USB_HID_LEFT,
- ACTION_USB_HID_LEFT_LONG,
- ACTION_USB_HID_RIGHT,
- ACTION_USB_HID_RIGHT_LONG,
- ACTION_USB_HID_SELECT,
- ACTION_USB_HID_SELECT_LONG,
- ACTION_USB_HID_MENU,
- ACTION_USB_HID_MENU_LONG,
- ACTION_USB_HID_MODE,
- ACTION_USB_HID_MODE_LONG,
+ ACTION_USB_HID_NONE,
+ ACTION_USB_HID_MODE_SWITCH_NEXT,
+ ACTION_USB_HID_MODE_SWITCH_PREV,
+ ACTION_USB_HID_MULTIMEDIA_VOLUME_UP,
+ ACTION_USB_HID_MULTIMEDIA_VOLUME_DOWN,
+ ACTION_USB_HID_MULTIMEDIA_VOLUME_MUTE,
+ ACTION_USB_HID_MULTIMEDIA_PLAYBACK_PLAY_PAUSE,
+ ACTION_USB_HID_MULTIMEDIA_PLAYBACK_STOP,
+ ACTION_USB_HID_MULTIMEDIA_PLAYBACK_TRACK_PREV,
+ ACTION_USB_HID_MULTIMEDIA_PLAYBACK_TRACK_NEXT,
+ ACTION_USB_HID_PRESENTATION_SLIDESHOW_START,
+ ACTION_USB_HID_PRESENTATION_SLIDESHOW_LEAVE,
+ ACTION_USB_HID_PRESENTATION_SLIDE_PREV,
+ ACTION_USB_HID_PRESENTATION_SLIDE_NEXT,
+ ACTION_USB_HID_PRESENTATION_SLIDE_FIRST,
+ ACTION_USB_HID_PRESENTATION_SLIDE_LAST,
+ ACTION_USB_HID_PRESENTATION_SCREEN_BLACK,
+ ACTION_USB_HID_PRESENTATION_SCREEN_WHITE,
+ ACTION_USB_HID_PRESENTATION_LINK_PREV,
+ ACTION_USB_HID_PRESENTATION_LINK_NEXT,
+ ACTION_USB_HID_PRESENTATION_MOUSE_CLICK,
+ ACTION_USB_HID_PRESENTATION_MOUSE_OVER,
+ ACTION_USB_HID_BROWSER_SCROLL_UP,
+ ACTION_USB_HID_BROWSER_SCROLL_DOWN,
+ ACTION_USB_HID_BROWSER_SCROLL_PAGE_DOWN,
+ ACTION_USB_HID_BROWSER_SCROLL_PAGE_UP,
+ ACTION_USB_HID_BROWSER_ZOOM_IN,
+ ACTION_USB_HID_BROWSER_ZOOM_OUT,
+ ACTION_USB_HID_BROWSER_ZOOM_RESET,
+ ACTION_USB_HID_BROWSER_TAB_PREV,
+ ACTION_USB_HID_BROWSER_TAB_NEXT,
+ ACTION_USB_HID_BROWSER_TAB_CLOSE,
+ ACTION_USB_HID_BROWSER_HISTORY_BACK,
+ ACTION_USB_HID_BROWSER_HISTORY_FORWARD,
+ ACTION_USB_HID_BROWSER_VIEW_FULL_SCREEN,
ACTION_USB_HID_MOUSE_UP,
ACTION_USB_HID_MOUSE_UP_REP,
ACTION_USB_HID_MOUSE_DOWN,