Detect whether the mouse is touching the ground or if it is in the air

Spread the love

Question Description

My sister and me are writing a program to help people, that suffer from tremor (trembling in hands).

The program recognizes if the mouse cursor is getting slower and then makes the cursor easier controllable and slower to make using a mouse with trembling hands easier.

The program works so far and there is only one problem: if the user lifts the mouse to another position, the speed is 0 for a short span of time. The program assumes that the cursor has to be slowed down, but this should not happen.

Is there any way to detect whether the mouse is touching the mouse pad/ground?

We are programming in C#.

Practice As Follows

Probably your best bet is to characterize what the mouse data loss like in this case, and then have your program ignore movement that matches.

For example, is the movement only exactly zero when the mouse is lifted our not being moved? If so, ignore movement under a low threshold.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.