Add USB HID mouse support for H10
- Protect mouse keymaps with #ifdef HAVE_USB_HID_MOUSE - Add preliminary support for remote mouse mode in iPods, pending P#10623 - Use ACTION_USB_HID_MOUSE_WHEEL_SCROLL_UP/DOWN instead of standard INC/DEC git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22940 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
ce53dd6523
commit
0c379b4b2e
14 changed files with 404 additions and 263 deletions
|
@ -287,6 +287,8 @@ enum {
|
||||||
ACTION_USB_HID_MOUSE_BUTTON_LEFT_REL,
|
ACTION_USB_HID_MOUSE_BUTTON_LEFT_REL,
|
||||||
ACTION_USB_HID_MOUSE_BUTTON_RIGHT,
|
ACTION_USB_HID_MOUSE_BUTTON_RIGHT,
|
||||||
ACTION_USB_HID_MOUSE_BUTTON_RIGHT_REL,
|
ACTION_USB_HID_MOUSE_BUTTON_RIGHT_REL,
|
||||||
|
ACTION_USB_HID_MOUSE_WHEEL_SCROLL_UP,
|
||||||
|
ACTION_USB_HID_MOUSE_WHEEL_SCROLL_DOWN,
|
||||||
ACTION_USB_HID_LAST, /* Place holder */
|
ACTION_USB_HID_LAST, /* Place holder */
|
||||||
|
|
||||||
LAST_ACTION_PLACEHOLDER, /* custom actions should be this + something */
|
LAST_ACTION_PLACEHOLDER, /* custom actions should be this + something */
|
||||||
|
|
|
@ -255,34 +255,38 @@ static const struct button_mapping button_context_usb_hid[] = {
|
||||||
}; /* button_context_usb_hid */
|
}; /* button_context_usb_hid */
|
||||||
|
|
||||||
static const struct button_mapping button_context_usb_hid_mouse[] = {
|
static const struct button_mapping button_context_usb_hid_mouse[] = {
|
||||||
{ ACTION_USB_HID_MOUSE_UP, BUTTON_UP, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_UP, BUTTON_UP, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_UP_REP, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_UP_REP, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_DOWN, BUTTON_DOWN, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_DOWN, BUTTON_DOWN, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_DOWN_REP, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_DOWN_REP, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LEFT, BUTTON_LEFT, 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_LEFT_REP, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_RIGHT, BUTTON_RIGHT, 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_RIGHT_REP, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_UP, BUTTON_SELECT|BUTTON_UP, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_BUTTON_LEFT, BUTTON_SELECT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_UP_REP, BUTTON_SELECT|BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_BUTTON_LEFT_REL, BUTTON_SELECT|BUTTON_REL, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_DOWN, BUTTON_SELECT|BUTTON_DOWN, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_UP, BUTTON_SELECT|BUTTON_UP, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_DOWN_REP, BUTTON_SELECT|BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_UP_REP, BUTTON_SELECT|BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_LEFT, BUTTON_SELECT|BUTTON_LEFT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_DOWN, BUTTON_SELECT|BUTTON_DOWN, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_LEFT_REP, BUTTON_SELECT|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_DOWN_REP, BUTTON_SELECT|BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_RIGHT, BUTTON_SELECT|BUTTON_RIGHT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_LEFT, BUTTON_SELECT|BUTTON_LEFT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_RIGHT_REP, BUTTON_SELECT|BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_LEFT_REP, BUTTON_SELECT|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_RDRAG_UP, BUTTON_POWER|BUTTON_UP, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_RIGHT, BUTTON_SELECT|BUTTON_RIGHT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_RDRAG_UP_REP, BUTTON_POWER|BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_RIGHT_REP, BUTTON_SELECT|BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_RDRAG_DOWN, BUTTON_POWER|BUTTON_DOWN, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_BUTTON_RIGHT, BUTTON_POWER, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_RDRAG_DOWN_REP, BUTTON_POWER|BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_BUTTON_RIGHT_REL, BUTTON_POWER|BUTTON_REL, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_RDRAG_LEFT, BUTTON_POWER|BUTTON_LEFT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_RDRAG_UP, BUTTON_POWER|BUTTON_UP, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_RDRAG_LEFT_REP, BUTTON_POWER|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_RDRAG_UP_REP, BUTTON_POWER|BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_RDRAG_RIGHT, BUTTON_POWER|BUTTON_RIGHT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_RDRAG_DOWN, BUTTON_POWER|BUTTON_DOWN, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_RDRAG_RIGHT_REP, BUTTON_POWER|BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_RDRAG_DOWN_REP, BUTTON_POWER|BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_BUTTON_LEFT, BUTTON_SELECT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_RDRAG_LEFT, BUTTON_POWER|BUTTON_LEFT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_BUTTON_LEFT_REL, BUTTON_SELECT|BUTTON_REL, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_RDRAG_LEFT_REP, BUTTON_POWER|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_BUTTON_RIGHT, BUTTON_POWER, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_RDRAG_RIGHT, BUTTON_POWER|BUTTON_RIGHT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_BUTTON_RIGHT_REL, BUTTON_POWER|BUTTON_REL, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_RDRAG_RIGHT_REP, BUTTON_POWER|BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_WHEEL_SCROLL_UP, BUTTON_VOLUP, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_WHEEL_SCROLL_UP, BUTTON_VOLUP|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_WHEEL_SCROLL_DOWN, BUTTON_VOLDOWN, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_WHEEL_SCROLL_DOWN, BUTTON_VOLDOWN|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
|
||||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_USB_HID)
|
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_USB_HID)
|
||||||
}; /* button_context_usb_hid_mouse */
|
}; /* button_context_usb_hid_mouse */
|
||||||
|
|
|
@ -288,39 +288,45 @@ static const struct button_mapping button_context_usb_hid[] = {
|
||||||
LAST_ITEM_IN_LIST
|
LAST_ITEM_IN_LIST
|
||||||
}; /* button_context_usb_hid */
|
}; /* button_context_usb_hid */
|
||||||
|
|
||||||
|
#ifdef HAVE_USB_HID_MOUSE
|
||||||
static const struct button_mapping button_context_usb_hid_mouse[] = {
|
static const struct button_mapping button_context_usb_hid_mouse[] = {
|
||||||
{ ACTION_USB_HID_MOUSE_UP, BUTTON_UP, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_UP, BUTTON_UP, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_UP_REP, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_UP_REP, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_DOWN, BUTTON_DOWN, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_DOWN, BUTTON_DOWN, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_DOWN_REP, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_DOWN_REP, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LEFT, BUTTON_LEFT, 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_LEFT_REP, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_RIGHT, BUTTON_RIGHT, 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_RIGHT_REP, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_UP, BUTTON_SELECT|BUTTON_UP, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_BUTTON_LEFT, BUTTON_SELECT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_UP_REP, BUTTON_SELECT|BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_BUTTON_LEFT_REL, BUTTON_SELECT|BUTTON_REL, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_DOWN, BUTTON_SELECT|BUTTON_DOWN, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_UP, BUTTON_SELECT|BUTTON_UP, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_DOWN_REP, BUTTON_SELECT|BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_UP_REP, BUTTON_SELECT|BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_LEFT, BUTTON_SELECT|BUTTON_LEFT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_DOWN, BUTTON_SELECT|BUTTON_DOWN, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_LEFT_REP, BUTTON_SELECT|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_DOWN_REP, BUTTON_SELECT|BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_RIGHT, BUTTON_SELECT|BUTTON_RIGHT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_LEFT, BUTTON_SELECT|BUTTON_LEFT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_RIGHT_REP, BUTTON_SELECT|BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_LEFT_REP, BUTTON_SELECT|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_RDRAG_UP, BUTTON_POWER|BUTTON_UP, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_RIGHT, BUTTON_SELECT|BUTTON_RIGHT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_RDRAG_UP_REP, BUTTON_POWER|BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_RIGHT_REP, BUTTON_SELECT|BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_RDRAG_DOWN, BUTTON_POWER|BUTTON_DOWN, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_BUTTON_RIGHT, BUTTON_POWER, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_RDRAG_DOWN_REP, BUTTON_POWER|BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_BUTTON_RIGHT_REL, BUTTON_POWER|BUTTON_REL, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_RDRAG_LEFT, BUTTON_POWER|BUTTON_LEFT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_RDRAG_UP, BUTTON_POWER|BUTTON_UP, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_RDRAG_LEFT_REP, BUTTON_POWER|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_RDRAG_UP_REP, BUTTON_POWER|BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_RDRAG_RIGHT, BUTTON_POWER|BUTTON_RIGHT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_RDRAG_DOWN, BUTTON_POWER|BUTTON_DOWN, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_RDRAG_RIGHT_REP, BUTTON_POWER|BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_RDRAG_DOWN_REP, BUTTON_POWER|BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_BUTTON_LEFT, BUTTON_SELECT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_RDRAG_LEFT, BUTTON_POWER|BUTTON_LEFT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_BUTTON_LEFT_REL, BUTTON_SELECT|BUTTON_REL, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_RDRAG_LEFT_REP, BUTTON_POWER|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_BUTTON_RIGHT, BUTTON_POWER, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_RDRAG_RIGHT, BUTTON_POWER|BUTTON_RIGHT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_BUTTON_RIGHT_REL, BUTTON_POWER|BUTTON_REL, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_RDRAG_RIGHT_REP, BUTTON_POWER|BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_WHEEL_SCROLL_UP, BUTTON_VOL_UP, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_WHEEL_SCROLL_UP, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_WHEEL_SCROLL_DOWN, BUTTON_VOL_DOWN, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_WHEEL_SCROLL_DOWN, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
|
||||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_USB_HID)
|
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_USB_HID)
|
||||||
}; /* button_context_usb_hid_mouse */
|
}; /* button_context_usb_hid_mouse */
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/* get_context_mapping returns a pointer to one of the above defined arrays depending on the context */
|
/* get_context_mapping returns a pointer to one of the above defined arrays depending on the context */
|
||||||
const struct button_mapping* get_context_mapping(int context)
|
const struct button_mapping* get_context_mapping(int context)
|
||||||
|
@ -371,8 +377,10 @@ const struct button_mapping* get_context_mapping(int context)
|
||||||
#ifdef USB_ENABLE_HID
|
#ifdef USB_ENABLE_HID
|
||||||
case CONTEXT_USB_HID:
|
case CONTEXT_USB_HID:
|
||||||
return button_context_usb_hid;
|
return button_context_usb_hid;
|
||||||
|
#ifdef HAVE_USB_HID_MOUSE
|
||||||
case CONTEXT_USB_HID_MOUSE:
|
case CONTEXT_USB_HID_MOUSE:
|
||||||
return button_context_usb_hid_mouse;
|
return button_context_usb_hid_mouse;
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
return button_context_standard;
|
return button_context_standard;
|
||||||
|
|
|
@ -297,39 +297,45 @@ static const struct button_mapping button_context_usb_hid[] = {
|
||||||
LAST_ITEM_IN_LIST
|
LAST_ITEM_IN_LIST
|
||||||
}; /* button_context_usb_hid */
|
}; /* button_context_usb_hid */
|
||||||
|
|
||||||
|
#ifdef HAVE_USB_HID_MOUSE
|
||||||
static const struct button_mapping button_context_usb_hid_mouse[] = {
|
static const struct button_mapping button_context_usb_hid_mouse[] = {
|
||||||
{ ACTION_USB_HID_MOUSE_UP, BUTTON_UP, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_UP, BUTTON_UP, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_UP_REP, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_UP_REP, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_DOWN, BUTTON_DOWN, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_DOWN, BUTTON_DOWN, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_DOWN_REP, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_DOWN_REP, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LEFT, BUTTON_LEFT, 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_LEFT_REP, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_RIGHT, BUTTON_RIGHT, 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_RIGHT_REP, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_UP, BUTTON_SELECT|BUTTON_UP, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_BUTTON_LEFT, BUTTON_SELECT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_UP_REP, BUTTON_SELECT|BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_BUTTON_LEFT_REL, BUTTON_SELECT|BUTTON_REL, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_DOWN, BUTTON_SELECT|BUTTON_DOWN, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_UP, BUTTON_SELECT|BUTTON_UP, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_DOWN_REP, BUTTON_SELECT|BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_UP_REP, BUTTON_SELECT|BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_LEFT, BUTTON_SELECT|BUTTON_LEFT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_DOWN, BUTTON_SELECT|BUTTON_DOWN, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_LEFT_REP, BUTTON_SELECT|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_DOWN_REP, BUTTON_SELECT|BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_RIGHT, BUTTON_SELECT|BUTTON_RIGHT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_LEFT, BUTTON_SELECT|BUTTON_LEFT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_RIGHT_REP, BUTTON_SELECT|BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_LEFT_REP, BUTTON_SELECT|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_RDRAG_UP, BUTTON_HOME|BUTTON_UP, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_RIGHT, BUTTON_SELECT|BUTTON_RIGHT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_RDRAG_UP_REP, BUTTON_HOME|BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_RIGHT_REP, BUTTON_SELECT|BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_RDRAG_DOWN, BUTTON_HOME|BUTTON_DOWN, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_BUTTON_RIGHT, BUTTON_HOME, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_RDRAG_DOWN_REP, BUTTON_HOME|BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_BUTTON_RIGHT_REL, BUTTON_HOME|BUTTON_REL, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_RDRAG_LEFT, BUTTON_HOME|BUTTON_LEFT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_RDRAG_UP, BUTTON_HOME|BUTTON_UP, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_RDRAG_LEFT_REP, BUTTON_HOME|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_RDRAG_UP_REP, BUTTON_HOME|BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_RDRAG_RIGHT, BUTTON_HOME|BUTTON_RIGHT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_RDRAG_DOWN, BUTTON_HOME|BUTTON_DOWN, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_RDRAG_RIGHT_REP, BUTTON_HOME|BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_RDRAG_DOWN_REP, BUTTON_HOME|BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_BUTTON_LEFT, BUTTON_SELECT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_RDRAG_LEFT, BUTTON_HOME|BUTTON_LEFT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_BUTTON_LEFT_REL, BUTTON_SELECT|BUTTON_REL, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_RDRAG_LEFT_REP, BUTTON_HOME|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_BUTTON_RIGHT, BUTTON_HOME, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_RDRAG_RIGHT, BUTTON_HOME|BUTTON_RIGHT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_BUTTON_RIGHT_REL, BUTTON_HOME|BUTTON_REL, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_RDRAG_RIGHT_REP, BUTTON_HOME|BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_WHEEL_SCROLL_UP, BUTTON_VOL_UP, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_WHEEL_SCROLL_UP, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_WHEEL_SCROLL_DOWN, BUTTON_VOL_DOWN, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_WHEEL_SCROLL_DOWN, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
|
||||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_USB_HID)
|
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_USB_HID)
|
||||||
}; /* button_context_usb_hid_mouse */
|
}; /* button_context_usb_hid_mouse */
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/* get_context_mapping returns a pointer to one of the above defined arrays depending on the context */
|
/* get_context_mapping returns a pointer to one of the above defined arrays depending on the context */
|
||||||
const struct button_mapping* get_context_mapping(int context)
|
const struct button_mapping* get_context_mapping(int context)
|
||||||
|
@ -381,8 +387,10 @@ const struct button_mapping* get_context_mapping(int context)
|
||||||
#ifdef USB_ENABLE_HID
|
#ifdef USB_ENABLE_HID
|
||||||
case CONTEXT_USB_HID:
|
case CONTEXT_USB_HID:
|
||||||
return button_context_usb_hid;
|
return button_context_usb_hid;
|
||||||
|
#ifdef HAVE_USB_HID_MOUSE
|
||||||
case CONTEXT_USB_HID_MOUSE:
|
case CONTEXT_USB_HID_MOUSE:
|
||||||
return button_context_usb_hid_mouse;
|
return button_context_usb_hid_mouse;
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
return button_context_standard;
|
return button_context_standard;
|
||||||
|
|
|
@ -299,39 +299,45 @@ static const struct button_mapping button_context_usb_hid[] = {
|
||||||
LAST_ITEM_IN_LIST
|
LAST_ITEM_IN_LIST
|
||||||
}; /* button_context_usb_hid */
|
}; /* button_context_usb_hid */
|
||||||
|
|
||||||
|
#ifdef HAVE_USB_HID_MOUSE
|
||||||
static const struct button_mapping button_context_usb_hid_mouse[] = {
|
static const struct button_mapping button_context_usb_hid_mouse[] = {
|
||||||
{ ACTION_USB_HID_MOUSE_UP, BUTTON_UP, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_UP, BUTTON_UP, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_UP_REP, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_UP_REP, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_DOWN, BUTTON_DOWN, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_DOWN, BUTTON_DOWN, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_DOWN_REP, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_DOWN_REP, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LEFT, BUTTON_LEFT, 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_LEFT_REP, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_RIGHT, BUTTON_RIGHT, 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_RIGHT_REP, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_UP, BUTTON_SELECT|BUTTON_UP, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_BUTTON_LEFT, BUTTON_SELECT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_UP_REP, BUTTON_SELECT|BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_BUTTON_LEFT_REL, BUTTON_SELECT|BUTTON_REL, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_DOWN, BUTTON_SELECT|BUTTON_DOWN, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_UP, BUTTON_SELECT|BUTTON_UP, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_DOWN_REP, BUTTON_SELECT|BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_UP_REP, BUTTON_SELECT|BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_LEFT, BUTTON_SELECT|BUTTON_LEFT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_DOWN, BUTTON_SELECT|BUTTON_DOWN, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_LEFT_REP, BUTTON_SELECT|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_DOWN_REP, BUTTON_SELECT|BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_RIGHT, BUTTON_SELECT|BUTTON_RIGHT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_LEFT, BUTTON_SELECT|BUTTON_LEFT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_RIGHT_REP, BUTTON_SELECT|BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_LEFT_REP, BUTTON_SELECT|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_RDRAG_UP, BUTTON_POWER|BUTTON_UP, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_RIGHT, BUTTON_SELECT|BUTTON_RIGHT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_RDRAG_UP_REP, BUTTON_POWER|BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_RIGHT_REP, BUTTON_SELECT|BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_RDRAG_DOWN, BUTTON_POWER|BUTTON_DOWN, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_BUTTON_RIGHT, BUTTON_POWER, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_RDRAG_DOWN_REP, BUTTON_POWER|BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_BUTTON_RIGHT_REL, BUTTON_POWER|BUTTON_REL, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_RDRAG_LEFT, BUTTON_POWER|BUTTON_LEFT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_RDRAG_UP, BUTTON_POWER|BUTTON_UP, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_RDRAG_LEFT_REP, BUTTON_POWER|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_RDRAG_UP_REP, BUTTON_POWER|BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_RDRAG_RIGHT, BUTTON_POWER|BUTTON_RIGHT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_RDRAG_DOWN, BUTTON_POWER|BUTTON_DOWN, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_RDRAG_RIGHT_REP, BUTTON_POWER|BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_RDRAG_DOWN_REP, BUTTON_POWER|BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_BUTTON_LEFT, BUTTON_SELECT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_RDRAG_LEFT, BUTTON_POWER|BUTTON_LEFT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_BUTTON_LEFT_REL, BUTTON_SELECT|BUTTON_REL, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_RDRAG_LEFT_REP, BUTTON_POWER|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_BUTTON_RIGHT, BUTTON_POWER, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_RDRAG_RIGHT, BUTTON_POWER|BUTTON_RIGHT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_BUTTON_RIGHT_REL, BUTTON_POWER|BUTTON_REL, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_RDRAG_RIGHT_REP, BUTTON_POWER|BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_WHEEL_SCROLL_UP, BUTTON_SCROLL_BACK, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_WHEEL_SCROLL_UP, BUTTON_SCROLL_BACK|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_WHEEL_SCROLL_DOWN, BUTTON_SCROLL_FWD, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_WHEEL_SCROLL_DOWN, BUTTON_SCROLL_FWD|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
|
||||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_USB_HID)
|
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_USB_HID)
|
||||||
}; /* button_context_usb_hid_mouse */
|
}; /* button_context_usb_hid_mouse */
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/* get_context_mapping returns a pointer to one of the above defined arrays depending on the context */
|
/* get_context_mapping returns a pointer to one of the above defined arrays depending on the context */
|
||||||
const struct button_mapping* get_context_mapping(int context)
|
const struct button_mapping* get_context_mapping(int context)
|
||||||
|
@ -383,8 +389,10 @@ const struct button_mapping* get_context_mapping(int context)
|
||||||
#ifdef USB_ENABLE_HID
|
#ifdef USB_ENABLE_HID
|
||||||
case CONTEXT_USB_HID:
|
case CONTEXT_USB_HID:
|
||||||
return button_context_usb_hid;
|
return button_context_usb_hid;
|
||||||
|
#ifdef HAVE_USB_HID_MOUSE
|
||||||
case CONTEXT_USB_HID_MOUSE:
|
case CONTEXT_USB_HID_MOUSE:
|
||||||
return button_context_usb_hid_mouse;
|
return button_context_usb_hid_mouse;
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
return button_context_standard;
|
return button_context_standard;
|
||||||
|
|
|
@ -511,49 +511,55 @@ static const struct button_mapping remote_button_context_usb_hid[] = {
|
||||||
LAST_ITEM_IN_LIST
|
LAST_ITEM_IN_LIST
|
||||||
}; /* remote_button_context_usb_hid */
|
}; /* remote_button_context_usb_hid */
|
||||||
|
|
||||||
|
#ifdef HAVE_USB_HID_MOUSE
|
||||||
static const struct button_mapping button_context_usb_hid_mouse[] = {
|
static const struct button_mapping button_context_usb_hid_mouse[] = {
|
||||||
{ ACTION_USB_HID_MOUSE_UP, BUTTON_UP, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_UP, BUTTON_UP, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_UP_REP, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_UP_REP, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_DOWN, BUTTON_DOWN, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_DOWN, BUTTON_DOWN, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_DOWN_REP, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_DOWN_REP, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LEFT, BUTTON_LEFT, 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_LEFT_REP, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_RIGHT, BUTTON_RIGHT, 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_RIGHT_REP, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_UP, BUTTON_SELECT|BUTTON_UP, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_UP, BUTTON_SELECT|BUTTON_UP, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_UP, BUTTON_BACK|BUTTON_UP, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_UP, BUTTON_BACK|BUTTON_UP, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_UP_REP, BUTTON_SELECT|BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_UP_REP, BUTTON_SELECT|BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_UP_REP, BUTTON_BACK|BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_UP_REP, BUTTON_BACK|BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_DOWN, BUTTON_SELECT|BUTTON_DOWN, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_DOWN, BUTTON_SELECT|BUTTON_DOWN, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_DOWN, BUTTON_BACK|BUTTON_DOWN, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_DOWN, BUTTON_BACK|BUTTON_DOWN, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_DOWN_REP, BUTTON_SELECT|BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_DOWN_REP, BUTTON_SELECT|BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_DOWN_REP, BUTTON_BACK|BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_DOWN_REP, BUTTON_BACK|BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_LEFT, BUTTON_SELECT|BUTTON_LEFT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_BUTTON_LEFT, BUTTON_SELECT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_LEFT, BUTTON_BACK|BUTTON_LEFT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_BUTTON_LEFT_REL, BUTTON_SELECT|BUTTON_REL, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_LEFT_REP, BUTTON_SELECT|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_LEFT, BUTTON_SELECT|BUTTON_LEFT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_LEFT_REP, BUTTON_BACK|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_LEFT_REP, BUTTON_SELECT|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_RIGHT, BUTTON_SELECT|BUTTON_RIGHT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_RIGHT, BUTTON_SELECT|BUTTON_RIGHT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_RIGHT, BUTTON_BACK|BUTTON_RIGHT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_RIGHT_REP, BUTTON_SELECT|BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_RIGHT_REP, BUTTON_SELECT|BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_BUTTON_LEFT, BUTTON_BACK, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_RIGHT_REP, BUTTON_BACK|BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_BUTTON_LEFT_REL, BUTTON_BACK|BUTTON_REL, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_RDRAG_UP, BUTTON_MENU|BUTTON_UP, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_LEFT, BUTTON_BACK|BUTTON_LEFT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_RDRAG_UP_REP, BUTTON_MENU|BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_LEFT_REP, BUTTON_BACK|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_RDRAG_DOWN, BUTTON_MENU|BUTTON_DOWN, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_RIGHT, BUTTON_BACK|BUTTON_RIGHT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_RDRAG_DOWN_REP, BUTTON_MENU|BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_RIGHT_REP, BUTTON_BACK|BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_RDRAG_LEFT, BUTTON_MENU|BUTTON_LEFT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_BUTTON_RIGHT, BUTTON_MENU, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_RDRAG_LEFT_REP, BUTTON_MENU|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_BUTTON_RIGHT_REL, BUTTON_MENU|BUTTON_REL, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_RDRAG_RIGHT, BUTTON_MENU|BUTTON_RIGHT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_RDRAG_UP, BUTTON_MENU|BUTTON_UP, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_RDRAG_RIGHT_REP, BUTTON_MENU|BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_RDRAG_UP_REP, BUTTON_MENU|BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_BUTTON_LEFT, BUTTON_SELECT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_RDRAG_DOWN, BUTTON_MENU|BUTTON_DOWN, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_BUTTON_LEFT, BUTTON_BACK, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_RDRAG_DOWN_REP, BUTTON_MENU|BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_BUTTON_LEFT_REL, BUTTON_SELECT|BUTTON_REL, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_RDRAG_LEFT, BUTTON_MENU|BUTTON_LEFT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_BUTTON_LEFT_REL, BUTTON_BACK|BUTTON_REL, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_RDRAG_LEFT_REP, BUTTON_MENU|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_BUTTON_RIGHT, BUTTON_MENU, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_RDRAG_RIGHT, BUTTON_MENU|BUTTON_RIGHT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_BUTTON_RIGHT_REL, BUTTON_MENU|BUTTON_REL, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_RDRAG_RIGHT_REP, BUTTON_MENU|BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_WHEEL_SCROLL_UP, BUTTON_VOL_UP, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_WHEEL_SCROLL_UP, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_WHEEL_SCROLL_DOWN, BUTTON_VOL_DOWN, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_WHEEL_SCROLL_DOWN, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
|
||||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_USB_HID)
|
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_USB_HID)
|
||||||
}; /* button_context_usb_hid_mouse */
|
}; /* button_context_usb_hid_mouse */
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
static const struct button_mapping* get_context_mapping_remote( int context )
|
static const struct button_mapping* get_context_mapping_remote( int context )
|
||||||
{
|
{
|
||||||
|
@ -671,8 +677,10 @@ const struct button_mapping* get_context_mapping(int context)
|
||||||
#ifdef USB_ENABLE_HID
|
#ifdef USB_ENABLE_HID
|
||||||
case CONTEXT_USB_HID:
|
case CONTEXT_USB_HID:
|
||||||
return button_context_usb_hid;
|
return button_context_usb_hid;
|
||||||
|
#ifdef HAVE_USB_HID_MOUSE
|
||||||
case CONTEXT_USB_HID_MOUSE:
|
case CONTEXT_USB_HID_MOUSE:
|
||||||
return button_context_usb_hid_mouse;
|
return button_context_usb_hid_mouse;
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
return button_context_standard;
|
return button_context_standard;
|
||||||
|
|
|
@ -357,6 +357,41 @@ static const struct button_mapping button_context_usb_hid[] = {
|
||||||
LAST_ITEM_IN_LIST
|
LAST_ITEM_IN_LIST
|
||||||
}; /* button_context_usb_hid */
|
}; /* button_context_usb_hid */
|
||||||
|
|
||||||
|
#ifdef HAVE_USB_HID_MOUSE
|
||||||
|
static const struct button_mapping button_context_usb_hid_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_POWER, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_BUTTON_LEFT_REL, BUTTON_POWER|BUTTON_REL, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_LDRAG_UP, BUTTON_POWER|BUTTON_SCROLL_UP, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_LDRAG_UP_REP, BUTTON_POWER|BUTTON_SCROLL_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_LDRAG_DOWN, BUTTON_POWER|BUTTON_SCROLL_DOWN, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_LDRAG_DOWN_REP, BUTTON_POWER|BUTTON_SCROLL_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_LDRAG_LEFT, BUTTON_POWER|BUTTON_LEFT, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_LDRAG_LEFT_REP, BUTTON_POWER|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_LDRAG_RIGHT, BUTTON_POWER|BUTTON_RIGHT, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_LDRAG_RIGHT_REP, BUTTON_POWER|BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_BUTTON_RIGHT, BUTTON_PLAY, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_BUTTON_RIGHT_REL, BUTTON_PLAY|BUTTON_REL, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_RDRAG_UP, BUTTON_PLAY|BUTTON_UP, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_RDRAG_UP_REP, BUTTON_PLAY|BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_RDRAG_DOWN, BUTTON_PLAY|BUTTON_DOWN, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_RDRAG_DOWN_REP, BUTTON_PLAY|BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_RDRAG_LEFT, BUTTON_PLAY|BUTTON_LEFT, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_RDRAG_LEFT_REP, BUTTON_PLAY|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_RDRAG_RIGHT, BUTTON_PLAY|BUTTON_RIGHT, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_RDRAG_RIGHT_REP, BUTTON_PLAY|BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
|
||||||
|
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_USB_HID)
|
||||||
|
}; /* button_context_usb_hid_mouse */
|
||||||
|
#endif
|
||||||
|
|
||||||
static const struct button_mapping remote_button_context_usb_hid[] = {
|
static const struct button_mapping remote_button_context_usb_hid[] = {
|
||||||
{ ACTION_USB_HID_INC, BUTTON_RC_VOL_UP, BUTTON_NONE },
|
{ ACTION_USB_HID_INC, BUTTON_RC_VOL_UP, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_INC, BUTTON_RC_VOL_UP|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_INC, BUTTON_RC_VOL_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
@ -463,6 +498,10 @@ const struct button_mapping* get_context_mapping(int context)
|
||||||
#ifdef USB_ENABLE_HID
|
#ifdef USB_ENABLE_HID
|
||||||
case CONTEXT_USB_HID:
|
case CONTEXT_USB_HID:
|
||||||
return button_context_usb_hid;
|
return button_context_usb_hid;
|
||||||
|
#ifdef HAVE_USB_HID_MOUSE
|
||||||
|
case CONTEXT_USB_HID_MOUSE:
|
||||||
|
return button_context_usb_hid_mouse;
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
return button_context_standard;
|
return button_context_standard;
|
||||||
|
|
|
@ -308,39 +308,46 @@ static const struct button_mapping button_context_usb_hid[] = {
|
||||||
LAST_ITEM_IN_LIST
|
LAST_ITEM_IN_LIST
|
||||||
}; /* button_context_usb_hid */
|
}; /* button_context_usb_hid */
|
||||||
|
|
||||||
|
#ifdef HAVE_USB_HID_MOUSE
|
||||||
static const struct button_mapping button_context_usb_hid_mouse[] = {
|
static const struct button_mapping button_context_usb_hid_mouse[] = {
|
||||||
{ ACTION_USB_HID_MOUSE_UP, BUTTON_UP, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_UP, BUTTON_UP, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_UP_REP, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_UP_REP, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_DOWN, BUTTON_DOWN, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_DOWN, BUTTON_DOWN, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_DOWN_REP, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_DOWN_REP, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LEFT, BUTTON_LEFT, 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_LEFT_REP, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_RIGHT, BUTTON_RIGHT, 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_RIGHT_REP, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_UP, BUTTON_SELECT|BUTTON_UP, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_BUTTON_LEFT, BUTTON_SELECT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_UP_REP, BUTTON_SELECT|BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_BUTTON_LEFT_REL, BUTTON_SELECT|BUTTON_REL, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_DOWN, BUTTON_SELECT|BUTTON_DOWN, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_UP, BUTTON_SELECT|BUTTON_UP, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_DOWN_REP, BUTTON_SELECT|BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_UP_REP, BUTTON_SELECT|BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_LEFT, BUTTON_SELECT|BUTTON_LEFT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_DOWN, BUTTON_SELECT|BUTTON_DOWN, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_LEFT_REP, BUTTON_SELECT|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_DOWN_REP, BUTTON_SELECT|BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_RIGHT, BUTTON_SELECT|BUTTON_RIGHT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_LEFT, BUTTON_SELECT|BUTTON_LEFT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_RIGHT_REP, BUTTON_SELECT|BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_LEFT_REP, BUTTON_SELECT|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_RDRAG_UP, BUTTON_POWER|BUTTON_UP, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_RIGHT, BUTTON_SELECT|BUTTON_RIGHT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_RDRAG_UP_REP, BUTTON_POWER|BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_RIGHT_REP, BUTTON_SELECT|BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_RDRAG_DOWN, BUTTON_POWER|BUTTON_DOWN, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_BUTTON_RIGHT, BUTTON_POWER, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_RDRAG_DOWN_REP, BUTTON_POWER|BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_BUTTON_RIGHT_REL, BUTTON_POWER|BUTTON_REL, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_RDRAG_LEFT, BUTTON_POWER|BUTTON_LEFT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_RDRAG_UP, BUTTON_POWER|BUTTON_UP, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_RDRAG_LEFT_REP, BUTTON_POWER|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_RDRAG_UP_REP, BUTTON_POWER|BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_RDRAG_RIGHT, BUTTON_POWER|BUTTON_RIGHT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_RDRAG_DOWN, BUTTON_POWER|BUTTON_DOWN, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_RDRAG_RIGHT_REP, BUTTON_POWER|BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_RDRAG_DOWN_REP, BUTTON_POWER|BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_BUTTON_LEFT, BUTTON_SELECT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_RDRAG_LEFT, BUTTON_POWER|BUTTON_LEFT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_BUTTON_LEFT_REL, BUTTON_SELECT|BUTTON_REL, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_RDRAG_LEFT_REP, BUTTON_POWER|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_BUTTON_RIGHT, BUTTON_POWER, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_RDRAG_RIGHT, BUTTON_POWER|BUTTON_RIGHT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_BUTTON_RIGHT_REL, BUTTON_POWER|BUTTON_REL, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_RDRAG_RIGHT_REP, BUTTON_POWER|BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_WHEEL_SCROLL_UP, BUTTON_VOL_UP, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_WHEEL_SCROLL_UP, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_WHEEL_SCROLL_DOWN, BUTTON_VOL_DOWN, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_WHEEL_SCROLL_DOWN, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
|
||||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_USB_HID)
|
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_USB_HID)
|
||||||
|
|
||||||
}; /* button_context_usb_hid_mouse */
|
}; /* button_context_usb_hid_mouse */
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
const struct button_mapping* get_context_mapping(int context)
|
const struct button_mapping* get_context_mapping(int context)
|
||||||
{
|
{
|
||||||
|
@ -392,8 +399,10 @@ const struct button_mapping* get_context_mapping(int context)
|
||||||
#ifdef USB_ENABLE_HID
|
#ifdef USB_ENABLE_HID
|
||||||
case CONTEXT_USB_HID:
|
case CONTEXT_USB_HID:
|
||||||
return button_context_usb_hid;
|
return button_context_usb_hid;
|
||||||
|
#ifdef HAVE_USB_HID_MOUSE
|
||||||
case CONTEXT_USB_HID_MOUSE:
|
case CONTEXT_USB_HID_MOUSE:
|
||||||
return button_context_usb_hid_mouse;
|
return button_context_usb_hid_mouse;
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
return button_context_standard;
|
return button_context_standard;
|
||||||
|
|
|
@ -213,29 +213,35 @@ static const struct button_mapping button_context_usb_hid[] = {
|
||||||
LAST_ITEM_IN_LIST
|
LAST_ITEM_IN_LIST
|
||||||
}; /* button_context_usb_hid */
|
}; /* button_context_usb_hid */
|
||||||
|
|
||||||
|
#ifdef HAVE_USB_HID_MOUSE
|
||||||
static const struct button_mapping button_context_usb_hid_mouse[] = {
|
static const struct button_mapping button_context_usb_hid_mouse[] = {
|
||||||
{ ACTION_USB_HID_MOUSE_UP, BUTTON_MENU, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_UP, BUTTON_MENU, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_UP_REP, BUTTON_MENU|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_UP_REP, BUTTON_MENU|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_DOWN, BUTTON_PLAY, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_DOWN, BUTTON_PLAY, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_DOWN_REP, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_DOWN_REP, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LEFT, BUTTON_LEFT, 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_LEFT_REP, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_RIGHT, BUTTON_RIGHT, 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_RIGHT_REP, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_UP, BUTTON_SELECT|BUTTON_MENU, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_BUTTON_LEFT, BUTTON_SELECT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_UP_REP, BUTTON_SELECT|BUTTON_MENU|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_BUTTON_LEFT_REL, BUTTON_SELECT|BUTTON_REL, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_DOWN, BUTTON_SELECT|BUTTON_PLAY, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_UP, BUTTON_SELECT|BUTTON_MENU, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_DOWN_REP, BUTTON_SELECT|BUTTON_PLAY|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_UP_REP, BUTTON_SELECT|BUTTON_MENU|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_LEFT, BUTTON_SELECT|BUTTON_LEFT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_DOWN, BUTTON_SELECT|BUTTON_PLAY, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_LEFT_REP, BUTTON_SELECT|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_DOWN_REP, BUTTON_SELECT|BUTTON_PLAY|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_RIGHT, BUTTON_SELECT|BUTTON_RIGHT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_LEFT, BUTTON_SELECT|BUTTON_LEFT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_RIGHT_REP, BUTTON_SELECT|BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_LEFT_REP, BUTTON_SELECT|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_BUTTON_LEFT, BUTTON_SELECT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_RIGHT, BUTTON_SELECT|BUTTON_RIGHT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_BUTTON_LEFT_REL, BUTTON_SELECT|BUTTON_REL, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_RIGHT_REP, BUTTON_SELECT|BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_WHEEL_SCROLL_UP, BUTTON_SCROLL_BACK, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_WHEEL_SCROLL_UP, BUTTON_SCROLL_BACK|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_WHEEL_SCROLL_DOWN, BUTTON_SCROLL_FWD, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_WHEEL_SCROLL_DOWN, BUTTON_SCROLL_FWD|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
|
||||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_USB_HID)
|
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_USB_HID)
|
||||||
}; /* button_context_usb_hid_mouse */
|
}; /* button_context_usb_hid_mouse */
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#if BUTTON_REMOTE != 0
|
#if BUTTON_REMOTE != 0
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
@ -284,6 +290,37 @@ static const struct button_mapping remote_button_context_usb_hid[] = {
|
||||||
|
|
||||||
LAST_ITEM_IN_LIST
|
LAST_ITEM_IN_LIST
|
||||||
}; /* remote_button_context_usb_hid */
|
}; /* remote_button_context_usb_hid */
|
||||||
|
|
||||||
|
#if 0 /* Pending P#10623: Improved accessory support and detection for Ipod */
|
||||||
|
#ifdef HAVE_USB_HID_MOUSE
|
||||||
|
static const struct button_mapping remote_button_context_usb_hid_mouse[] = {
|
||||||
|
{ ACTION_USB_HID_MOUSE_UP, BUTTON_RC_MENU, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_UP_REP, BUTTON_RC_MENU|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_DOWN, BUTTON_RC_PLAY, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_DOWN_REP, BUTTON_RC_PLAY|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_LEFT, BUTTON_RC_LEFT, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_LEFT_REP, BUTTON_RC_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_RIGHT, BUTTON_RC_RIGHT, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_RIGHT_REP, BUTTON_RC_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_BUTTON_LEFT, BUTTON_RC_SELECT, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_BUTTON_LEFT_REL, BUTTON_RC_SELECT|BUTTON_REL, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_LDRAG_UP, BUTTON_RC_SELECT|BUTTON_RC_MENU, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_LDRAG_UP_REP, BUTTON_RC_SELECT|BUTTON_RC_MENU|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_LDRAG_DOWN, BUTTON_RC_SELECT|BUTTON_RC_PLAY, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_LDRAG_DOWN_REP, BUTTON_RC_SELECT|BUTTON_RC_PLAY|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_LDRAG_LEFT, BUTTON_RC_SELECT|BUTTON_RC_LEFT, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_LDRAG_LEFT_REP, BUTTON_RC_SELECT|BUTTON_RC_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_LDRAG_RIGHT, BUTTON_RC_SELECT|BUTTON_RC_RIGHT, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_LDRAG_RIGHT_REP, BUTTON_RC_SELECT|BUTTON_RC_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_WHEEL_SCROLL_UP, BUTTON_RC_VOL_UP, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_WHEEL_SCROLL_UP, BUTTON_RC_VOL_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_WHEEL_SCROLL_DOWN, BUTTON_RC_VOL_DOWN, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_WHEEL_SCROLL_DOWN, BUTTON_RC_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
|
||||||
|
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_USB_HID)
|
||||||
|
}; /* remote_button_context_usb_hid_mouse */
|
||||||
|
#endif
|
||||||
|
#endif /* if 0 */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static const struct button_mapping* get_context_mapping_remote( int context )
|
static const struct button_mapping* get_context_mapping_remote( int context )
|
||||||
|
@ -297,6 +334,12 @@ static const struct button_mapping* get_context_mapping_remote( int context )
|
||||||
#ifdef USB_ENABLE_HID
|
#ifdef USB_ENABLE_HID
|
||||||
case CONTEXT_USB_HID:
|
case CONTEXT_USB_HID:
|
||||||
return remote_button_context_usb_hid;
|
return remote_button_context_usb_hid;
|
||||||
|
#if 0 /* Pending P#10623: Improved accessory support and detection for Ipod */
|
||||||
|
#ifdef HAVE_USB_HID_MOUSE
|
||||||
|
case CONTEXT_USB_HID_MOUSE:
|
||||||
|
return remote_button_context_usb_hid_mouse;
|
||||||
|
#endif
|
||||||
|
#endif /* If 0 */
|
||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
return remote_button_context_standard;
|
return remote_button_context_standard;
|
||||||
|
@ -353,8 +396,10 @@ const struct button_mapping* get_context_mapping(int context)
|
||||||
#ifdef USB_ENABLE_HID
|
#ifdef USB_ENABLE_HID
|
||||||
case CONTEXT_USB_HID:
|
case CONTEXT_USB_HID:
|
||||||
return button_context_usb_hid;
|
return button_context_usb_hid;
|
||||||
|
#ifdef HAVE_USB_HID_MOUSE
|
||||||
case CONTEXT_USB_HID_MOUSE:
|
case CONTEXT_USB_HID_MOUSE:
|
||||||
return button_context_usb_hid_mouse;
|
return button_context_usb_hid_mouse;
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
return button_context_standard;
|
return button_context_standard;
|
||||||
|
|
|
@ -356,14 +356,20 @@ static const struct button_mapping button_context_usb_hid_mouse[] = {
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_DOWN, BUTTON_MENU|BUTTON_DOWN, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_DOWN, BUTTON_MENU|BUTTON_DOWN, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_DOWN_REP, BUTTON_SELECT|BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_DOWN_REP, BUTTON_SELECT|BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_DOWN_REP, BUTTON_MENU|BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_DOWN_REP, BUTTON_MENU|BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_BUTTON_LEFT, BUTTON_SELECT, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_BUTTON_LEFT_REL, BUTTON_SELECT|BUTTON_REL, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_LEFT, BUTTON_SELECT|BUTTON_LEFT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_LEFT, BUTTON_SELECT|BUTTON_LEFT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_LEFT, BUTTON_MENU|BUTTON_LEFT, BUTTON_NONE },
|
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_LEFT_REP, BUTTON_SELECT|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_LEFT_REP, BUTTON_SELECT|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_LEFT_REP, BUTTON_MENU|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_RIGHT, BUTTON_SELECT|BUTTON_RIGHT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_RIGHT, BUTTON_SELECT|BUTTON_RIGHT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_RIGHT, BUTTON_MENU|BUTTON_RIGHT, BUTTON_NONE },
|
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_RIGHT_REP, BUTTON_SELECT|BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_RIGHT_REP, BUTTON_SELECT|BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_BUTTON_LEFT, BUTTON_MENU, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_BUTTON_LEFT_REL, BUTTON_MENU|BUTTON_REL, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_LDRAG_LEFT, BUTTON_MENU|BUTTON_LEFT, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_LDRAG_LEFT_REP, BUTTON_MENU|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_LDRAG_RIGHT, BUTTON_MENU|BUTTON_RIGHT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_RIGHT_REP, BUTTON_MENU|BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_RIGHT_REP, BUTTON_MENU|BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_BUTTON_RIGHT, BUTTON_PLAY, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_BUTTON_RIGHT_REL, BUTTON_PLAY|BUTTON_REL, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_RDRAG_UP, BUTTON_PLAY|BUTTON_UP, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_RDRAG_UP, BUTTON_PLAY|BUTTON_UP, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_RDRAG_UP_REP, BUTTON_PLAY|BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_RDRAG_UP_REP, BUTTON_PLAY|BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_RDRAG_DOWN, BUTTON_PLAY|BUTTON_DOWN, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_RDRAG_DOWN, BUTTON_PLAY|BUTTON_DOWN, BUTTON_NONE },
|
||||||
|
@ -372,12 +378,6 @@ static const struct button_mapping button_context_usb_hid_mouse[] = {
|
||||||
{ ACTION_USB_HID_MOUSE_RDRAG_LEFT_REP, BUTTON_PLAY|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_RDRAG_LEFT_REP, BUTTON_PLAY|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_RDRAG_RIGHT, BUTTON_PLAY|BUTTON_RIGHT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_RDRAG_RIGHT, BUTTON_PLAY|BUTTON_RIGHT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_RDRAG_RIGHT_REP, BUTTON_PLAY|BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_RDRAG_RIGHT_REP, BUTTON_PLAY|BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_BUTTON_LEFT, BUTTON_SELECT, BUTTON_NONE },
|
|
||||||
{ ACTION_USB_HID_MOUSE_BUTTON_LEFT, BUTTON_MENU, BUTTON_NONE },
|
|
||||||
{ ACTION_USB_HID_MOUSE_BUTTON_LEFT_REL, BUTTON_SELECT|BUTTON_REL, BUTTON_NONE },
|
|
||||||
{ ACTION_USB_HID_MOUSE_BUTTON_LEFT_REL, BUTTON_MENU|BUTTON_REL, BUTTON_NONE },
|
|
||||||
{ ACTION_USB_HID_MOUSE_BUTTON_RIGHT, BUTTON_PLAY, BUTTON_NONE },
|
|
||||||
{ ACTION_USB_HID_MOUSE_BUTTON_RIGHT_REL, BUTTON_PLAY|BUTTON_REL, BUTTON_NONE },
|
|
||||||
|
|
||||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_USB_HID)
|
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_USB_HID)
|
||||||
}; /* button_context_usb_hid_mouse */
|
}; /* button_context_usb_hid_mouse */
|
||||||
|
|
|
@ -304,39 +304,45 @@ static const struct button_mapping button_context_usb_hid[] = {
|
||||||
LAST_ITEM_IN_LIST
|
LAST_ITEM_IN_LIST
|
||||||
}; /* button_context_usb_hid */
|
}; /* button_context_usb_hid */
|
||||||
|
|
||||||
|
#ifdef HAVE_USB_HID_MOUSE
|
||||||
static const struct button_mapping button_context_usb_hid_mouse[] = {
|
static const struct button_mapping button_context_usb_hid_mouse[] = {
|
||||||
{ ACTION_USB_HID_MOUSE_UP, BUTTON_UP, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_UP, BUTTON_UP, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_UP_REP, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_UP_REP, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_DOWN, BUTTON_DOWN, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_DOWN, BUTTON_DOWN, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_DOWN_REP, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_DOWN_REP, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LEFT, BUTTON_LEFT, 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_LEFT_REP, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_RIGHT, BUTTON_RIGHT, 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_RIGHT_REP, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_UP, BUTTON_PREV|BUTTON_UP, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_BUTTON_LEFT, BUTTON_PREV, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_UP_REP, BUTTON_PREV|BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_BUTTON_LEFT_REL, BUTTON_PREV|BUTTON_REL, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_DOWN, BUTTON_PREV|BUTTON_DOWN, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_UP, BUTTON_PREV|BUTTON_UP, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_DOWN_REP, BUTTON_PREV|BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_UP_REP, BUTTON_PREV|BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_LEFT, BUTTON_PREV|BUTTON_LEFT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_DOWN, BUTTON_PREV|BUTTON_DOWN, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_LEFT_REP, BUTTON_PREV|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_DOWN_REP, BUTTON_PREV|BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_RIGHT, BUTTON_PREV|BUTTON_RIGHT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_LEFT, BUTTON_PREV|BUTTON_LEFT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_RIGHT_REP, BUTTON_PREV|BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_LEFT_REP, BUTTON_PREV|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_RDRAG_UP, BUTTON_NEXT|BUTTON_UP, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_RIGHT, BUTTON_PREV|BUTTON_RIGHT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_RDRAG_UP_REP, BUTTON_NEXT|BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_LDRAG_RIGHT_REP, BUTTON_PREV|BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_RDRAG_DOWN, BUTTON_NEXT|BUTTON_DOWN, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_BUTTON_RIGHT, BUTTON_NEXT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_RDRAG_DOWN_REP, BUTTON_NEXT|BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_BUTTON_RIGHT_REL, BUTTON_NEXT|BUTTON_REL, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_RDRAG_LEFT, BUTTON_NEXT|BUTTON_LEFT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_RDRAG_UP, BUTTON_NEXT|BUTTON_UP, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_RDRAG_LEFT_REP, BUTTON_NEXT|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_RDRAG_UP_REP, BUTTON_NEXT|BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_RDRAG_RIGHT, BUTTON_NEXT|BUTTON_RIGHT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_RDRAG_DOWN, BUTTON_NEXT|BUTTON_DOWN, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_RDRAG_RIGHT_REP, BUTTON_NEXT|BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_RDRAG_DOWN_REP, BUTTON_NEXT|BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_BUTTON_LEFT, BUTTON_PREV, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_RDRAG_LEFT, BUTTON_NEXT|BUTTON_LEFT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_BUTTON_LEFT_REL, BUTTON_PREV|BUTTON_REL, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_RDRAG_LEFT_REP, BUTTON_NEXT|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_BUTTON_RIGHT, BUTTON_NEXT, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_RDRAG_RIGHT, BUTTON_NEXT|BUTTON_RIGHT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MOUSE_BUTTON_RIGHT_REL, BUTTON_NEXT|BUTTON_REL, BUTTON_NONE },
|
{ ACTION_USB_HID_MOUSE_RDRAG_RIGHT_REP, BUTTON_NEXT|BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_WHEEL_SCROLL_UP, BUTTON_VOL_UP, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_WHEEL_SCROLL_UP, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_WHEEL_SCROLL_DOWN, BUTTON_VOL_DOWN, BUTTON_NONE },
|
||||||
|
{ ACTION_USB_HID_MOUSE_WHEEL_SCROLL_DOWN, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
|
||||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_USB_HID)
|
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_USB_HID)
|
||||||
}; /* button_context_usb_hid_mouse */
|
}; /* button_context_usb_hid_mouse */
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
const struct button_mapping* get_context_mapping(int context)
|
const struct button_mapping* get_context_mapping(int context)
|
||||||
{
|
{
|
||||||
|
@ -388,8 +394,10 @@ const struct button_mapping* get_context_mapping(int context)
|
||||||
#ifdef USB_ENABLE_HID
|
#ifdef USB_ENABLE_HID
|
||||||
case CONTEXT_USB_HID:
|
case CONTEXT_USB_HID:
|
||||||
return button_context_usb_hid;
|
return button_context_usb_hid;
|
||||||
|
#ifdef HAVE_USB_HID_MOUSE
|
||||||
case CONTEXT_USB_HID_MOUSE:
|
case CONTEXT_USB_HID_MOUSE:
|
||||||
return button_context_usb_hid_mouse;
|
return button_context_usb_hid_mouse;
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
return button_context_standard;
|
return button_context_standard;
|
||||||
|
|
|
@ -143,43 +143,43 @@ static const hid_key_mapping_t hid_key_mapping_mouse = {
|
||||||
HID_USAGE_PAGE_GENERIC_DESKTOP_CONTROLS,
|
HID_USAGE_PAGE_GENERIC_DESKTOP_CONTROLS,
|
||||||
{
|
{
|
||||||
/* Cursor move up */
|
/* Cursor move up */
|
||||||
{ ACTION_USB_HID_MOUSE_UP, HID_MOUSE_UP },
|
{ ACTION_USB_HID_MOUSE_UP, HID_MOUSE_UP },
|
||||||
{ ACTION_USB_HID_MOUSE_UP_REP, HID_MOUSE_UP_REP },
|
{ ACTION_USB_HID_MOUSE_UP_REP, HID_MOUSE_UP_REP },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_UP, HID_MOUSE_LDRAG_UP },
|
{ ACTION_USB_HID_MOUSE_LDRAG_UP, HID_MOUSE_LDRAG_UP },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_UP_REP, HID_MOUSE_LDRAG_UP_REP },
|
{ ACTION_USB_HID_MOUSE_LDRAG_UP_REP, HID_MOUSE_LDRAG_UP_REP },
|
||||||
{ ACTION_USB_HID_MOUSE_RDRAG_UP, HID_MOUSE_RDRAG_UP },
|
{ ACTION_USB_HID_MOUSE_RDRAG_UP, HID_MOUSE_RDRAG_UP },
|
||||||
{ ACTION_USB_HID_MOUSE_RDRAG_UP_REP, HID_MOUSE_RDRAG_UP_REP },
|
{ ACTION_USB_HID_MOUSE_RDRAG_UP_REP, HID_MOUSE_RDRAG_UP_REP },
|
||||||
/* Cursor move down */
|
/* Cursor move down */
|
||||||
{ ACTION_USB_HID_MOUSE_DOWN, HID_MOUSE_DOWN },
|
{ ACTION_USB_HID_MOUSE_DOWN, HID_MOUSE_DOWN },
|
||||||
{ ACTION_USB_HID_MOUSE_DOWN_REP, HID_MOUSE_DOWN_REP },
|
{ ACTION_USB_HID_MOUSE_DOWN_REP, HID_MOUSE_DOWN_REP },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_DOWN, HID_MOUSE_LDRAG_DOWN },
|
{ ACTION_USB_HID_MOUSE_LDRAG_DOWN, HID_MOUSE_LDRAG_DOWN },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_DOWN_REP, HID_MOUSE_LDRAG_DOWN_REP },
|
{ ACTION_USB_HID_MOUSE_LDRAG_DOWN_REP, HID_MOUSE_LDRAG_DOWN_REP },
|
||||||
{ ACTION_USB_HID_MOUSE_RDRAG_DOWN, HID_MOUSE_RDRAG_DOWN },
|
{ ACTION_USB_HID_MOUSE_RDRAG_DOWN, HID_MOUSE_RDRAG_DOWN },
|
||||||
{ ACTION_USB_HID_MOUSE_RDRAG_DOWN_REP, HID_MOUSE_RDRAG_DOWN_REP },
|
{ ACTION_USB_HID_MOUSE_RDRAG_DOWN_REP, HID_MOUSE_RDRAG_DOWN_REP },
|
||||||
/* Cursor move left */
|
/* Cursor move left */
|
||||||
{ ACTION_USB_HID_MOUSE_LEFT, HID_MOUSE_LEFT },
|
{ ACTION_USB_HID_MOUSE_LEFT, HID_MOUSE_LEFT },
|
||||||
{ ACTION_USB_HID_MOUSE_LEFT_REP, HID_MOUSE_LEFT_REP },
|
{ ACTION_USB_HID_MOUSE_LEFT_REP, HID_MOUSE_LEFT_REP },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_LEFT, HID_MOUSE_LDRAG_LEFT },
|
{ ACTION_USB_HID_MOUSE_LDRAG_LEFT, HID_MOUSE_LDRAG_LEFT },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_LEFT_REP, HID_MOUSE_LDRAG_LEFT_REP },
|
{ ACTION_USB_HID_MOUSE_LDRAG_LEFT_REP, HID_MOUSE_LDRAG_LEFT_REP },
|
||||||
{ ACTION_USB_HID_MOUSE_RDRAG_LEFT, HID_MOUSE_RDRAG_LEFT },
|
{ ACTION_USB_HID_MOUSE_RDRAG_LEFT, HID_MOUSE_RDRAG_LEFT },
|
||||||
{ ACTION_USB_HID_MOUSE_RDRAG_LEFT_REP, HID_MOUSE_RDRAG_LEFT_REP },
|
{ ACTION_USB_HID_MOUSE_RDRAG_LEFT_REP, HID_MOUSE_RDRAG_LEFT_REP },
|
||||||
/* Cursor move right */
|
/* Cursor move right */
|
||||||
{ ACTION_USB_HID_MOUSE_RIGHT, HID_MOUSE_RIGHT },
|
{ ACTION_USB_HID_MOUSE_RIGHT, HID_MOUSE_RIGHT },
|
||||||
{ ACTION_USB_HID_MOUSE_RIGHT_REP, HID_MOUSE_RIGHT_REP },
|
{ ACTION_USB_HID_MOUSE_RIGHT_REP, HID_MOUSE_RIGHT_REP },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_RIGHT, HID_MOUSE_LDRAG_RIGHT },
|
{ ACTION_USB_HID_MOUSE_LDRAG_RIGHT, HID_MOUSE_LDRAG_RIGHT },
|
||||||
{ ACTION_USB_HID_MOUSE_LDRAG_RIGHT_REP, HID_MOUSE_LDRAG_RIGHT_REP },
|
{ ACTION_USB_HID_MOUSE_LDRAG_RIGHT_REP, HID_MOUSE_LDRAG_RIGHT_REP },
|
||||||
{ ACTION_USB_HID_MOUSE_RDRAG_RIGHT, HID_MOUSE_RDRAG_RIGHT },
|
{ ACTION_USB_HID_MOUSE_RDRAG_RIGHT, HID_MOUSE_RDRAG_RIGHT },
|
||||||
{ ACTION_USB_HID_MOUSE_RDRAG_RIGHT_REP, HID_MOUSE_RDRAG_RIGHT_REP },
|
{ ACTION_USB_HID_MOUSE_RDRAG_RIGHT_REP, HID_MOUSE_RDRAG_RIGHT_REP },
|
||||||
/* Mouse button left-click */
|
/* Mouse button left-click */
|
||||||
{ ACTION_USB_HID_MOUSE_BUTTON_LEFT, HID_MOUSE_BUTTON_LEFT },
|
{ ACTION_USB_HID_MOUSE_BUTTON_LEFT, HID_MOUSE_BUTTON_LEFT },
|
||||||
{ ACTION_USB_HID_MOUSE_BUTTON_LEFT_REL, HID_MOUSE_BUTTON_LEFT_REL },
|
{ ACTION_USB_HID_MOUSE_BUTTON_LEFT_REL, HID_MOUSE_BUTTON_LEFT_REL },
|
||||||
/* Mouse button right-click */
|
/* Mouse button right-click */
|
||||||
{ ACTION_USB_HID_MOUSE_BUTTON_RIGHT, HID_MOUSE_BUTTON_RIGHT },
|
{ ACTION_USB_HID_MOUSE_BUTTON_RIGHT, HID_MOUSE_BUTTON_RIGHT },
|
||||||
{ ACTION_USB_HID_MOUSE_BUTTON_RIGHT_REL, HID_MOUSE_BUTTON_RIGHT_REL },
|
{ ACTION_USB_HID_MOUSE_BUTTON_RIGHT_REL, HID_MOUSE_BUTTON_RIGHT_REL },
|
||||||
/* Mouse wheel scroll up */
|
/* Mouse wheel scroll up */
|
||||||
{ ACTION_USB_HID_DEC, HID_MOUSE_SCROLL_UP },
|
{ ACTION_USB_HID_MOUSE_WHEEL_SCROLL_UP, HID_MOUSE_SCROLL_UP },
|
||||||
/* Mouse wheel scroll down */
|
/* Mouse wheel scroll down */
|
||||||
{ ACTION_USB_HID_INC, HID_MOUSE_SCROLL_DOWN },
|
{ ACTION_USB_HID_MOUSE_WHEEL_SCROLL_DOWN, HID_MOUSE_SCROLL_DOWN },
|
||||||
{ 0, 0 },
|
{ 0, 0 },
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -173,6 +173,7 @@
|
||||||
#define USE_ROCKBOX_USB
|
#define USE_ROCKBOX_USB
|
||||||
#define USB_VENDOR_ID 0x0B70
|
#define USB_VENDOR_ID 0x0B70
|
||||||
#define USB_PRODUCT_ID 0x00BA
|
#define USB_PRODUCT_ID 0x00BA
|
||||||
|
#define HAVE_USB_HID_MOUSE
|
||||||
|
|
||||||
/* Define this if you have adjustable CPU frequency */
|
/* Define this if you have adjustable CPU frequency */
|
||||||
#define HAVE_ADJUSTABLE_CPU_FREQ
|
#define HAVE_ADJUSTABLE_CPU_FREQ
|
||||||
|
|
|
@ -153,6 +153,7 @@
|
||||||
#define USE_ROCKBOX_USB
|
#define USE_ROCKBOX_USB
|
||||||
#define USB_VENDOR_ID 0x0B70
|
#define USB_VENDOR_ID 0x0B70
|
||||||
#define USB_PRODUCT_ID 0x00BA
|
#define USB_PRODUCT_ID 0x00BA
|
||||||
|
#define HAVE_USB_HID_MOUSE
|
||||||
|
|
||||||
/* Define this if you have adjustable CPU frequency */
|
/* Define this if you have adjustable CPU frequency */
|
||||||
#define HAVE_ADJUSTABLE_CPU_FREQ
|
#define HAVE_ADJUSTABLE_CPU_FREQ
|
||||||
|
|
Loading…
Reference in a new issue