Mapping mouse movement 
Author Message
 Mapping mouse movement

I need to program the mouse so that there is essentially
a one-to-one relationship between the physical distance
the mouse has been moved and the physical distance the
cursor has moved on the screen (e.g., move the mouse 10 cm,
the cursor moves 10 cm).  I am working with a graphics
mouse.  I have downloaded the Mouse unit from the "SWAG" team,
and by using the Set_Mouse_Physical_Movement_Ratio procedure,
I can speed-up/slow-down the movement of the mouse.  But I'm
not sure if this is the best way to do it.  Does any one have
any suggestions?  

Also, does any one know where I can find more info regarding
programming the mouse in general -- for e.g,  there is a
procedure called Set_Double_Speed_Threshold which also affects
mouse speed, as does using Set_Mouse_Sensitivity, but I
really don't know what I'm varying when I use these routines.

Thank you in advance,
Jackie Braun.



Wed, 18 Jun 1902 08:00:00 GMT  
 Mapping mouse movement


Quote:
>I need to program the mouse so that there is essentially
>a one-to-one relationship between the physical distance
>the mouse has been moved and the physical distance the
>cursor has moved on the screen (e.g., move the mouse 10 cm,
>the cursor moves 10 cm).  I am working with a graphics
>mouse.  I have downloaded the Mouse unit from the "SWAG" team,
>and by using the Set_Mouse_Physical_Movement_Ratio procedure,
>I can speed-up/slow-down the movement of the mouse.  But I'm
>not sure if this is the best way to do it.  Does any one have
>any suggestions?  

Ah well, this is quite difficult when you want your program to work
well on every PC. Mice aren't very accurate, and displays neither. I
would suggest to control the mouse at a rather low level, by using,
for instance function 3 and 4 of int. $33 after you've set the mouse
range window.

I would then let the user put a transparent sheet over the display
with a 10 by 10 cm square on it. The user must then trace this square
slowly several times with the mouse cursor. You can use this
information to calibrate the mouse to the display.

It would be better not to use a mouse in this manner, however. These
devices simply weren't made to be accurate.

Quote:
>Also, does any one know where I can find more info regarding
>programming the mouse in general -- for e.g,  there is a
>procedure called Set_Double_Speed_Threshold which also affects
>mouse speed, as does using Set_Mouse_Sensitivity, but I
>really don't know what I'm varying when I use these routines.

The mouse driver is a rather complex beast with over fifty different
function calls. If you want to control the mouse in the way you
suggested your surely need to have the documentation of all of these
functions. I would suggest to buy a book about it, maybe you can find
a nice cheap second-hand book.

The Set_Double_Speed_Threshold function does what it says. You can set
the number of internal mouse steps (called 'mickeys' in my book) per
second at which the cursor mouse will start to move twice as fast in
response to movements. My books suggest to set it to a high value
(5000) to prevent this function from kicking in.

The Set_Mouse_Sensitivity function is simply a combination of the
Set_Double_Speed_Threshold function and the
Set_Mouse_Physical_Movement_Ratio function.

Anyway, you need the full documentation. I would suggest to search the
web, I'm sure you can find it there.

Peter de Jong,

http://home.worldonline.nl/~wpdejong/vesa.html   (vesa/mouse unit)



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Mouse Movement

2. tracking/confining mouse movements

3. Mapping Color Bitmap to Mouse

4. Intercepting tab movement

5. Cursor Movement in Pascal

6. Spiral movement

7. Cursor movements..

8. Help :Movement (Graphics Mode)

9. Movement (Graphics Mode)

10. Graphics Movement

11. Movement (Graphics Mode)

12. TTable: how to trap cursor movement

 

 
Powered by phpBB® Forum Software