Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

c#

.net

mouse

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#.

like image 363
D-C Avatar asked May 18 '13 14:05

D-C


1 Answers

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.

like image 52
Chris Pitman Avatar answered Sep 28 '22 10:09

Chris Pitman