summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/keymaps/keymap-h10.c39
-rw-r--r--firmware/export/config-h10.h1
-rw-r--r--firmware/export/config-h10_5gb.h1
-rw-r--r--manual/configure_rockbox/system_options.tex4
4 files changed, 45 insertions, 0 deletions
diff --git a/apps/keymaps/keymap-h10.c b/apps/keymaps/keymap-h10.c
index 9b7800a3da..0106a8c86f 100644
--- a/apps/keymaps/keymap-h10.c
+++ b/apps/keymaps/keymap-h10.c
@@ -398,6 +398,35 @@ static const struct button_mapping button_context_usb_hid_mode_browser[] = {
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_USB_HID)
}; /* button_context_usb_hid_mode_browser */
+
+#ifdef HAVE_USB_HID_MOUSE
+static const struct button_mapping button_context_usb_hid_mode_mouse[] = {
+ { ACTION_USB_HID_MOUSE_UP, BUTTON_SCROLL_UP, BUTTON_NONE },
+ { ACTION_USB_HID_MOUSE_UP_REP, BUTTON_SCROLL_UP|BUTTON_REPEAT, BUTTON_NONE },
+ { ACTION_USB_HID_MOUSE_DOWN, BUTTON_SCROLL_DOWN, BUTTON_NONE },
+ { ACTION_USB_HID_MOUSE_DOWN_REP, BUTTON_SCROLL_DOWN|BUTTON_REPEAT, BUTTON_NONE },
+ { ACTION_USB_HID_MOUSE_LEFT, BUTTON_LEFT, BUTTON_NONE },
+ { ACTION_USB_HID_MOUSE_LEFT_REP, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
+ { ACTION_USB_HID_MOUSE_RIGHT, BUTTON_RIGHT, BUTTON_NONE },
+ { ACTION_USB_HID_MOUSE_RIGHT_REP, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
+ { ACTION_USB_HID_MOUSE_BUTTON_LEFT, BUTTON_PLAY, BUTTON_NONE },
+ { ACTION_USB_HID_MOUSE_BUTTON_LEFT_REL, BUTTON_PLAY|BUTTON_REL, BUTTON_NONE },
+ { ACTION_USB_HID_MOUSE_LDRAG_UP, BUTTON_PLAY|BUTTON_SCROLL_UP, BUTTON_NONE },
+ { ACTION_USB_HID_MOUSE_LDRAG_UP_REP, BUTTON_PLAY|BUTTON_SCROLL_UP|BUTTON_REPEAT, BUTTON_NONE },
+ { ACTION_USB_HID_MOUSE_LDRAG_DOWN, BUTTON_PLAY|BUTTON_SCROLL_DOWN, BUTTON_NONE },
+ { ACTION_USB_HID_MOUSE_LDRAG_DOWN_REP, BUTTON_PLAY|BUTTON_SCROLL_DOWN|BUTTON_REPEAT, BUTTON_NONE },
+ { ACTION_USB_HID_MOUSE_LDRAG_LEFT, BUTTON_PLAY|BUTTON_LEFT, BUTTON_NONE },
+ { ACTION_USB_HID_MOUSE_LDRAG_LEFT_REP, BUTTON_PLAY|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
+ { ACTION_USB_HID_MOUSE_LDRAG_RIGHT, BUTTON_PLAY|BUTTON_RIGHT, BUTTON_NONE },
+ { ACTION_USB_HID_MOUSE_LDRAG_RIGHT_REP, BUTTON_PLAY|BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
+ { ACTION_USB_HID_MOUSE_WHEEL_SCROLL_UP, BUTTON_REW, BUTTON_NONE },
+ { ACTION_USB_HID_MOUSE_WHEEL_SCROLL_UP, BUTTON_REW|BUTTON_REPEAT, BUTTON_NONE },
+ { ACTION_USB_HID_MOUSE_WHEEL_SCROLL_DOWN, BUTTON_FF, BUTTON_NONE },
+ { ACTION_USB_HID_MOUSE_WHEEL_SCROLL_DOWN, BUTTON_FF|BUTTON_REPEAT, BUTTON_NONE },
+
+ LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_USB_HID)
+}; /* button_context_usb_hid_mode_mouse */
+#endif
#endif
static const struct button_mapping* get_context_mapping_remote( int context )
@@ -485,6 +514,16 @@ const struct button_mapping* get_context_mapping(int context)
#ifdef USB_ENABLE_HID
case CONTEXT_USB_HID:
return button_context_usb_hid;
+ case CONTEXT_USB_HID_MODE_MULTIMEDIA:
+ return button_context_usb_hid_mode_multimedia;
+ case CONTEXT_USB_HID_MODE_PRESENTATION:
+ return button_context_usb_hid_mode_presentation;
+ case CONTEXT_USB_HID_MODE_BROWSER:
+ return button_context_usb_hid_mode_browser;
+#ifdef HAVE_USB_HID_MOUSE
+ case CONTEXT_USB_HID_MODE_MOUSE:
+ return button_context_usb_hid_mode_mouse;
+#endif
#endif
default:
return button_context_standard;
diff --git a/firmware/export/config-h10.h b/firmware/export/config-h10.h
index 0dc845c23b..5ac12af3fc 100644
--- a/firmware/export/config-h10.h
+++ b/firmware/export/config-h10.h
@@ -173,6 +173,7 @@
#define USE_ROCKBOX_USB
#define USB_VENDOR_ID 0x0B70
#define USB_PRODUCT_ID 0x00BA
+#define HAVE_USB_HID_MOUSE
/* Define this if you have adjustable CPU frequency */
#define HAVE_ADJUSTABLE_CPU_FREQ
diff --git a/firmware/export/config-h10_5gb.h b/firmware/export/config-h10_5gb.h
index 8275e50dc6..e39c6a6bbf 100644
--- a/firmware/export/config-h10_5gb.h
+++ b/firmware/export/config-h10_5gb.h
@@ -153,6 +153,7 @@
#define USE_ROCKBOX_USB
#define USB_VENDOR_ID 0x0B70
#define USB_PRODUCT_ID 0x00BA
+#define HAVE_USB_HID_MOUSE
/* Define this if you have adjustable CPU frequency */
#define HAVE_ADJUSTABLE_CPU_FREQ
diff --git a/manual/configure_rockbox/system_options.tex b/manual/configure_rockbox/system_options.tex
index a8fbac77e4..ab6ba9c82c 100644
--- a/manual/configure_rockbox/system_options.tex
+++ b/manual/configure_rockbox/system_options.tex
@@ -566,6 +566,8 @@ this option \setting{On}. If it is not required, then turning this setting
\opt{SANSA_E200_PAD,GIGABEAT_S_PAD,SANSA_C200_PAD,SANSA_CLIP_PAD%
,MROBE100_PAD}
{\ButtonUp / \ButtonDown / \ButtonLeft / \ButtonRight}
+ \opt{IRIVER_H10_PAD}
+ {\ButtonScrollUp / \ButtonScrollDown / \ButtonLeft / \ButtonRight}
\opt{IPOD_4G_PAD,IPOD_3G_PAD,IPOD_1G2G_PAD}
{\ButtonMenu / \ButtonPlay / \ButtonLeft / \ButtonRight}
\opt{HAVEREMOTEKEYMAP}{
@@ -579,6 +581,7 @@ this option \setting{On}. If it is not required, then turning this setting
,IPOD_3G_PAD,IPOD_1G2G_PAD}
{\ButtonSelect}
\opt{GIGABEAT_S_PAD}{\ButtonSelect; \ButtonBack}
+ \opt{IRIVER_H10_PAD}{\ButtonPlay}
\opt{MROBE100_PAD}{\ButtonMenu}
\opt{HAVEREMOTEKEYMAP}{
&
@@ -598,6 +601,7 @@ this option \setting{On}. If it is not required, then turning this setting
% Mouse wheel scroll up / down
\opt{SANSA_E200_PAD,IPOD_4G_PAD,IPOD_3G_PAD,IPOD_1G2G_PAD}
{\ButtonScrollBack / \ButtonScrollFwd}
+ \opt{IRIVER_H10_PAD}{\ButtonRew / \ButtonFF}
\opt{GIGABEAT_S_PAD}
{\ButtonVolUp; \ButtonPrev / \ButtonVolDown; \ButtonNext}
\opt{SANSA_C200_PAD,SANSA_CLIP_PAD,MROBE100_PAD}