1

I have a program operating in full screen mode. I would like to move the mouse to the center of the screen. Is this something I can do with the functionality of Mouse.h? https://www.arduino.cc/reference/en/language/functions/usb/mouse/

Mouse.move moves fixed increments. maybe I should change the mouse start location in the computer program.

my issue, is that the "circuit playground" is the primary interface, using the accelerator for position. Once the computer is running the software, the Arduino has to be centered to work properly.

alternatively, is there a command I can send that could center the mouse?

0

1 Answer 1

4

There are two ways of working with HID mice - absolute and relative. The Arduino Mouse library only works in relative mode, but you want absolute.

There's another library https://github.com/NicoHood/HID which does do considerably more than the normal Arduino HID libraries - including "Absolute Mouse".

1
  • hey cool, samd21 support! Thanks @Majenko
    – j0h
    Commented Aug 6, 2022 at 19:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.