Additional Mouse interface request

Claghorn

Member
I'm working on a project that will pass through a mouse on a usb host to a mouse output (just that to start with, once I get that working, I'll start adding various ways to tweak the mouse). The only interface in the Mouse class to set the buttons requires 5 separate buttons individually specified (which means it also can't deal with more than 5 buttons).

I want to add an interface that will set the complete button mask, making it simpler to do a single call to pass through the buttons from the host mouse.

This looks simple enough to do myself, but it seems like something that would be generally useful. Is this the best place to ask for this new feature?

I'm thinking something like this for the C code:

Code:
int usb_mouse_button_mask(uint8_t mask)
{
        usb_mouse_buttons_state = mask;
        return usb_mouse_move(0, 0, 0, 0);
}

and a corresponding set_button_mask class interface that calls it.
 
Actually thinking about this more, it might be best to have all the usb_mouse_move parameters as well as the button mask, then a single call could pass along everything that might have been reported changed in the host interface.
 
Back
Top