How can I reverse mouse movement (X & Y axis) system-wide? (Win 7 x64)

Couldn't find anything online, and I figured this shouldn't be too hard to make, so I went ahead and built one myself. Requires Microsoft .NET Framework 4.0 in order to run.

Polynomial's Mouse Inverter (freeware, under CC-BY-NC-SA license) - (Alt Link)

Let me know how it works out for you :)


Sorry this took so long, but here's the code that actually does the inversion:

internal class Inverter
{
    private Point pos = Cursor.Position;

    private bool invertX;

    private bool invertY;

    private bool running;

    private bool exit;

    public bool InvertX
    {
        get
        {
            return this.invertX;
        }
        set
        {
            this.invertX = value;
            if (this.InvertSettingsChanged != null)
            {
                this.InvertSettingsChanged(this, new EventArgs());
            }
        }
    }

    public bool InvertY
    {
        get
        {
            return this.invertY;
        }
        set
        {
            this.invertY = value;
            if (this.InvertSettingsChanged != null)
            {
                this.InvertSettingsChanged(this, new EventArgs());
            }
        }
    }

    public bool Running
    {
        get
        {
            return this.running;
        }
    }

    public Inverter(bool x, bool y)
    {
        this.invertX = x;
        this.invertY = y;
        this.pos = Cursor.Position;
    }

    private void MouseLoop()
    {
        Thread.CurrentThread.IsBackground = true;
        Thread.CurrentThread.Priority = ThreadPriority.Highest;
        while (!this.exit)
        {
            Point position = Cursor.Position;
            int right = (this.invertX ? this.pos.X - (position.X - this.pos.X) : position.X);
            if (this.invertX)
            {
                if (right < 2)
                {
                    right = 2;
                }
                if (right > Screen.FromPoint(position).Bounds.Right - 2)
                {
                    Rectangle bounds = Screen.FromPoint(position).Bounds;
                    right = bounds.Right - 2;
                }
            }
            int bottom = (this.invertY ? this.pos.Y - (position.Y - this.pos.Y) : position.Y);
            if (this.invertY)
            {
                if (bottom < 2)
                {
                    bottom = 2;
                }
                if (bottom > Screen.FromPoint(position).Bounds.Bottom - 2)
                {
                    Rectangle rectangle = Screen.FromPoint(position).Bounds;
                    bottom = rectangle.Bottom - 2;
                }
            }
            Cursor.Position = new Point(right, bottom);
            this.pos = Cursor.Position;
            Thread.Sleep(1);
        }
        this.exit = false;
    }

    public void Start()
    {
        this.pos = Cursor.Position;
        this.running = true;
        (new Thread(new ThreadStart(this.MouseLoop))).Start();
    }

    public void Stop()
    {
        this.running = false;
        this.exit = true;
    }

    public event EventHandler InvertSettingsChanged;
}

I just pulled this out of the executable with Telerik JustDecompile, because I don't have the original code. You can extract an entire VS project with JD if you need the full application code.


There's a program called SakasaMouse which reverses the mouse movements:

SakasaMouse is a freeware to reverse direction of mouse cursor movement in x-axis and/or y-axis.

If you move mouse to the right, the mouse pointer moves to the left.

It works for every mouse including a new wireless one just bought. The only problem with it is that it's liable to switch back without warning, which can be a bit disconcerting.


I'm the author of MAFMouse and it's no longer true that the x64 version does not work with USB mice - it works very good and system-wide, even for games.

I have many users who had to use the mouse rotated by 180 degrees before (with the cable pointing to the user) and they are very happy with this driver. Interestingly all but one are women :)

Installation is a bit complicated, please contact me for details...