Cursor Positions

Questions and answers about 3Dconnexion devices on Windows.

Moderator: Moderators

Post Reply
Marbleton
Posts: 5
Joined: Mon Mar 14, 2022 9:59 am

Cursor Positions

Post by Marbleton »

I'm having a bug where the <MouseXTo> and <MouseYTo> code outputs different positions.

I'm testing it with:
<MacroEntry>
<ID>Top View</ID>
<Sequence>
<MouseXTo>982</MouseXTo>
<MouseYTo>570</MouseYTo>
<MouseButton>Left</MouseButton>
</Sequence>
</MacroEntry>
jwick
Moderator
Moderator
Posts: 3456
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Re: Cursor Positions

Post by jwick »

I forgot all about these. I'm amazed you found them.

It probably depends on how far it needs to move.
I think it gets nonlinearly scaled with mouse acceleration.
I'll have a look.
...
I changed the implementation to be more predictable. I'm not sure if it will make the next release.

I also implemented the <MouseButton> functionality. Some devices (with Long Button Presses) generate the Press and Release in very fast order (very little separation), when the button is released (if the secondary function is not actuated). E.g., SME Button "1", if you hold it down a long time an on-screen display will be shown instead of actuating whatever the button is assigned to (your macro sequence in this case).

It is somewhat useful functionality. Though to be really useful, I think you need more control over the target location.

There is a MouseXToNamedLocation, but only "WindowCenter" is implemented. That is, it will move the cursor to the center of the current window.
To be truly useful, it needs something akin to "Move the cursor to the center of the window named "Top View Button" in application "Solidworks", wherever that is at the moment, and press then shortly afterwards release the Left Mouse button.

The only way to add that now is to code it on your own with the driver's extension mechanism.
Post Reply