Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 2 of 2

Thread: Additional Mouse interface request

  1. #1
    Junior Member
    Join Date
    Dec 2021
    Posts
    7

    Additional Mouse interface request

    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.

  2. #2
    Junior Member
    Join Date
    Dec 2021
    Posts
    7
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •