I am trying DigiMouse library for attiny85 Digispark board.

It allows to emulate the mouse quite well. However, I also need to know the current cursor position. Is there a way to get it?

  • 1
    emulate an "absolute position" mouse ... regular mouse only sends "relative move" values
    – jsotola
    Sep 19, 2019 at 17:48

1 Answer 1


There is no way for a mouse of any kind (especially not one as minimal as DigiMouse.h) to know the current cursor position - USB just doesn't provide that kind of facility.

Instead you need to implement an "absolute" mouse (aka a "tablet"). However DigiMouse doesn't implement such a facility. So you would have to implement your own tablet driver.

A normal mouse sends a "delta" for the position. That is, a difference in position from whatever the current position is. An absolute mouse, or tablet, sends the position on the screen as a proportion of some maximum set of dimensions. Ideally that would be the same dimensions as your screen, but doesn't have to be.

The main differences between DigiMouse and whatever you would implement for a DigiTablet would be the "HID Report Descriptor". This defines what the data that is sent means and how the computer should interpret it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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