Mouse Overlord

I found a very interesting Class for Realbasic that should help me with my problem: Mouse Overlord Classes v2.1 (http://developer.chaoticbox.com/)
Mouse Overlord provides global methods to control and capture the mouse cursor, giving applications exclusive access to raw mouse events. The event handlers report state changes for all available mouse buttons, X/Y movement deltas, and X/Y scroll-wheel deltas. Utility methods to move, hide, and show the mouse cursor are also included. These classes were designed to provide advanced mouse controls for video games but can also be useful in other contexts, such as CAD tools, 3D viewers, or kiosk applications.
But it is very old, for Realbasic 2006.
Does anyone know how to do that with recent Xojo ??

I believe I got lost in translation…

Xojo already provides some low level mouse events :
System.MouseX, System.MouseY, System.MouseDown, as well as Cursor possibilities with System.Cursors and MouseCursor.

MouseWheel on window and controls provide DeltaX and DeltaY. At least on Mac with the Magic Mouse or trackpad, DeltaX works well.

Right button is tracked by isContextualClick in MouseDown.

Ramon Sastre recently shared a declare that gives access to the middle button in https://forum.xojo.com/31205-mid-button-mouse-wheel-dragging-solved/0

I maybe wrong, but I am not sure you really need antique RealBasic classes that, at a quick glance, just use what I cited but are too old to work out of the box. It does not hurts to study that code, of course.

Actually, what I need is the mouse movement, not the cursor position.
Like in any 3D game, it doesn’t matter where the cursor is (it is even disabled), I need the mouse movement without the screen boundaries.

For Mac or Windows the solutions will generally require declares. But have you not already asked about that ?

What OSes?

Here’s a way to get the delta on mac with declare
https://forum.xojo.com/29851-how-to-get-the-delta-of-the-mouse-movement/0

I remember there’s a way to unlink the cursor so it doesn’t travel to the edges if that’s needed. And I can dig up code to move and click, or search the forums I know others have posted it.

Or maybe what you want is an EventTap to get mouse events system wide, even when your app is in the background?

It seems to solve my problem. I will study it. Thanks!

I knew I had seen this kind of discussion before :
https://forum.xojo.com/29851-how-to-get-the-delta-of-the-mouse-movement/0