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

27

6

Short Version

I'm looking for a way to reverse the X and Y mouse axis movements. The computer is running Windows 7, x64 and Logitech SetPoint 6.32. I would like a system-level, permanent fix; such as a mouse driver modification or a registry tweak. Does anyone know of a solid way of implementing this, or how to find the registry values to change this? I'll settle quite happily for how to enable the orientation feature in SetPoint 6.32 for mice as well as trackballs.

Long Version People seem never to understand why I would want this, and I commonly hear "just use the mouse right-side up!" advice. Dyslexia is not something which can be cured by "just reading things right." While I appreciate the attempts to help, I'm hoping some background may help people understand.

I have a user with an unusual form of dyslexia, for whom mouse movements are backward. If she wants to move her cursor left, she will move the mouse right. If she wants the cursor to move up, she'll move the mouse down. She used to hold her mouse upside-down, which makes sophisticated clicking difficult, is terrible for ergonomics, and makes multi-button mice completely useless.

In olden times, mouse drivers included an orientation feature (typically a hot-air balloon you dragged upward to set the mouse movement orientation) which could be used to set the relationship between mouse movement and cursor movement. Several years ago, mouse drivers were "improved" and this feature has since been limited to trackballs.

After losing the orientation feature she went back to upside-down mousing for a bit, until finding UberOptions, a tweak for Logitech SetPoint, which would enable all features for all pointing devices. This included the orientation feature. And there was much rejoicing.

Now her mouse has died, and current Logitech mice require a newer version of SetPoint for which UberOptions has not been updated. We've also seen MAF-Mouse (the developer indicated the version for 64-bit Windows does not support USB mice, yet) and Sakasa (while it works, commentary on the web indicate it tends to break randomly and often. It's also just a running program, so not system-wide.).

I have seen some very sophisticated registry hacks. For example, I used to use a hack which would change the codes created by the F1-F12 keys when the F-Lock key was invented and defaulted to screwing my keyboard up. I'm hoping there's a way to flip X and Y in the registry; or some other, similar, system-level tweak out there.

Another solution could be re-enabling the orientation feature for mice, as well as trackballs. It's very frustrating that input device drivers include the functionality we desperately need for an accessibilty concern, but it's been disabled in the name of making the drivers more idiot-proof.

Scivitri

Posted 2012-03-30T06:10:10.090

Reputation: 373

My tie-in question on Electronics for a hardware-minded solution: http://electronics.stackexchange.com/questions/29014/is-it-possible-to-make-a-usb-device-that-would-alter-mouse-data-on-the-fly

– JYelton – 2012-03-30T21:20:41.740

1

FYI, I'm running the latest version of SetPoint (albeit using a very old mouse that originally shipped with the version of SetPoint that UberOptions supported by default), and UberOptions still works. You just have to manually change the SetPoint folder to the one used in SetPoint 6 (setpointP). See here. Personally, I wish Logitech would just hire the UberOptions developer(s) already. SetPoint is atrocious and makes their keyboards/mice near unusable without uberOptions.

– Lèse majesté – 2012-03-30T23:44:15.327

1@Lèsemajesté I completely agree on wishing Logitech would hire the UberOptions dev(s). While she did have her old mouse working as you describe, the replacement mouse is not supported by UberOptions. Apparently there's a whole different SetPoint for gaming mice, and she's become quite attached to all the extra buttons since being able to turn her mouse over and reach them. – Scivitri – 2012-04-03T15:59:21.270

Answers

18

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.

Polynomial

Posted 2012-03-30T06:10:10.090

Reputation: 1 339

It may be great if you have one monitor, but it's not designed for multi-monitor setups. – user3071284 – 2015-06-04T19:41:06.853

@user3071284 I only had one monitor back then. I'm guessing there's probably a better solution now. – Polynomial – 2015-06-05T10:09:09.083

1@remyabel Core code added. Rest can be pulled out with JustDecompile if you need it. – Polynomial – 2015-06-05T10:15:09.900

Too bad this doesn't work on Roblox games, axis is inverted all they way even in game menus, but then when game starts, it reverts to default axis operation. Not a fault in the app, per se, but something Unity(?) does that prevents this from working. – Jussi Palo – 2017-03-31T18:59:34.440

@JussiPalo I believe that's because the mouse position capture in Unity occurs before it reaches the window messaging stack. To be clear: this code was designed to assist people with accessibility issues, and was only tested within the Windows desktop environment. – Polynomial – 2017-04-03T13:04:10.970

1Thank you! That was far more effort than I expected! We'll test it out, and see how it works for her. – Scivitri – 2012-04-03T15:57:04.127

No problem. It really wasn't that difficult to create. After I clean it up a little and add a few extra features, I'll release it as open source. – Polynomial – 2012-04-03T17:06:05.450

Is there any chance that you release the code anytime soon? Or, can you mail it to me? :) – Dirk – 2013-05-24T14:13:45.827

Just dug through my old hard disk, but it seems this code was lost :( If I get time, I'll reverse-engineer it back from the executable. – Polynomial – 2013-12-31T23:49:09.443

@polynomial That's unfortunate, considering it's been almost 2 years. – None – 2013-12-31T23:58:08.187

Sorry - easy to forget stuff like this with everything else going on! Also, happy new year ;] – Polynomial – 2014-01-01T00:08:13.490

10

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.

Fred Davis

Posted 2012-03-30T06:10:10.090

Reputation: 101

After logging back into a locked computer, the mouse cursor was invisible. It was a little tricky navigating to the task tray to close the app. Windows 8.1 – user3071284 – 2015-06-04T19:36:53.483

5

I'm the author of MAFMouse and it's true that the x64 version does not yet work with USB mice (the 32 bits version does!). I am currently too busy to work on this.

So my suggestion is to use a PS2 mouse - this 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 in Windows 7 is a bit complicated, please contact me for details...

Moritz

Posted 2012-03-30T06:10:10.090

Reputation: 51

how can they click the buttons with that position? – phuclv – 2014-10-20T07:39:53.960

Important update: I'm the author of MAFMouse and the restriction to 32 bits is now gone. x64 is supported and the driver is signed now, so installation is much easier. It is available on request (currently no download) and works very good and system-wide, even for games (i.e. the common Y-axis inversion). -Moritz – maf-soft – 2016-12-22T12:16:09.413

If it's not too much trouble, it would make this answer more useful for other users if you could post instructions or a link to them for installing it on Windows 7. – Lèse majesté – 2012-04-01T08:19:44.437

1Since I don't offer this beta version for public download, installation instructions alone won't help :) It's complicated, so creating those instructions will be some work and I first want to finish the driver. If you want to help with the instructions, you're welcome! – Moritz – 2012-04-01T10:21:25.420

1@Moritz Thank you for coming to SE, and joining the discussion! Unfortunately, I don't think her motherboard even has a PS2 port, anymore. They're kinda obsolete. She's also somewhat attached to the more button-ful mice, which tend to be USB only. – Scivitri – 2012-04-03T16:01:09.977

3

There is an interesting invert mouse AHK script:

BlockInput Mouse
SetMouseDelay -1

MouseGetPos x0, y0
SetTimer WatchMouse, 1
Return

WatchMouse:
   MouseGetPos x, y
   MouseMove 2*(x0-x), 2*(y0-y), 0, R
   MouseGetPos x0, y0
Return

!z::ExitApp

I got it from here: https://autohotkey.com/board/topic/17828-invert-mouse-axis/

In your case I would even check the possibility of doing some quick HW modification to invert the axis inside of the mouse..

tent

Posted 2012-03-30T06:10:10.090

Reputation: 51

0

I, too, have my mouse orientation reversed and I used to do it on XP with Intellipoint 4 and a PS2 mouse.

Since buying a Win 7 PC, Intellipoint 4 won't run on it, and so I now use Setpoint 4.8 with a Logitech USB mouse. On the uberoptions webpage it gives you a list of supported devices. It appears that no development has been done since about 2009 for new mice, so you have to find an older mouse. The M500 mouse is still freely available.

Guy Graham

Posted 2012-03-30T06:10:10.090

Reputation: 1