Score:2

Track speed of Mouse?

ar flag

I am creating an app that makes it so that when you move your mouse really fast, the mouse gets bigger for a second. This is a behavior I was used to when I used Mac a long time ago.

I need a way to track the speed/acceleration of the mouse in the terminal so I can see when to make the mouse get bigger.

I am looking for a terminal command that can track the speed of the mouse cursor.

cocomac avatar
cn flag
If you can get the location of the pointer, you could check it, say, ten times per second, and store the 50 most recent results in an array. From there, a bit of math would let you calculate the speed.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.