HID programming proposal

Hello there! This is my first post.

I was wondering if it was possible to use mouse.h and absmouse.h in the same sketch.

It seems not, if i mouse.move(0,0) pointer goes upper left screen.

But i read HID.cpp code and it seems you can copy & paste HID() singleton and i wrote HID2(), copy of HID(). In mouse.cpp i used HID2() and it works! I can use use mouse wheel and position absolute with absmouse in the same sketch!

Is this the right way?

I hope this is useful for anyone!

Davide

1 Like

Hi @sannaide. I recommend you to tell us where you got the library that provides absmouse.h. That might provide important information to the helpers here.

If you installed it using the Arduino Library Manager (Sketch > Include Library > Manage Libraries in the Arduino IDE or Libraries > Library Manager in the Arduino Web Editor) then say so and state the full name of the library.

If you downloaded it from a website, then please post a link to that website.

If i remember well i installed it via library manager.

Unfortunately, I don't know a lot about this subject. Your link was very informative though.

Hopefully one of the USB wizards here on the forum will be able to answer your question.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.