top | item 23080820

(no title)

ccostes | 5 years ago

It seems like cursor acceleration (breaking the linearity between pixel and physical distance) would make this non-trivial; curious how you implemented it.

discuss

order

spuz|5 years ago

Well I wanted to specifically measure cursor distance rather than mouse distance so acceleration doesn't come into it. As long as you can sample the mouse position frequently enough, you can get an idea of how far it has travelled. All I had to do to convert pixels to physical distance was use a tape measure to get the width and height of the visible part of the screen.

GhostVII|5 years ago

It sounds like they measures the distance the cursor on-screen moved, not how far they physically moved their mouse. So accelleration wouldn't be a factor.

andai|5 years ago

You mean to translate from pixels moved into mousepad-meters?