Inverting mouse axis using Karabiner Karabiner seems like an extremely versatile piece of software, but I can't seem to find a way to invert the mouse axis with it. For example: When I move the mouse downwards I want the cursor to go upwards, and when I move the mouse to the right, I want the cursor to go left.(*)

Right now I'm using USB Overdrive for this purpose, but I need Karabiner for other stuff, and it would be nice if I could get away with just one program.

(*) This sounds so strange that I feel I owe you an explanation: I have a trackball mouse which, due to it's form factor forces me to turn it 180 degrees on my desk. By inverting the axis in software, it still moves naturally.
To flip cursor movement you can use a third party tool: Karabiner. Karabiner isn't compatible with Sierra at the time of writing (January 2017).


Download, install and open Karabiner
Open in the menulet Karabiner -> Preferences
Open the tab Misc &amp; Uninstall
Hit the button Open private.xml
Open the file private.xml with an appropriate editor
Enter the customized keycode

&lt;?xml version="1.0"?&gt;
&lt;root&gt;
    &lt;item&gt;
    &lt;name&gt;3rd-Party Pointing Device&lt;/name&gt;
    &lt;item&gt;
        &lt;name&gt;Reverse Vertical &amp;amp; Horizontal Cursor Movement&lt;/name&gt;
        &lt;identifier&gt;reverse.mouse.movement&lt;/identifier&gt;
        &lt;autogen&gt;
          __FlipPointingRelative__
          Option::FLIPPOINTINGRELATIVE_HORIZONTAL,
          Option::FLIPPOINTINGRELATIVE_VERTICAL,
        &lt;/autogen&gt;
    &lt;/item&gt;
    &lt;/item&gt;
&lt;/root&gt;


If you already have other items in private.xml omit the first two and the last line of the above code.
Save the file
Open in the menulet Karabiner -> Preferences the tab Change Key
Hit the ReloadXML button
Enable the remapping. It should be listed at the beginning.






If you have a second pointing device (i.e. an Apple mouse or a trackpad) and want to use it normally, you have to restrict the mod to your trackball mouse by adding a devicevendordef/deviceproductdef somewhere and a device tag after the identifier tag in your private.xml. Example (sorry, only an Apple external keyboard):

&lt;devicevendordef&gt;
    &lt;vendorname&gt;Apple&lt;/vendorname&gt;
    &lt;vendorid&gt;0x05ac&lt;/vendorid&gt;
&lt;/devicevendordef&gt;
&lt;deviceproductdef&gt;
    &lt;productname&gt;ExternalKeyboard&lt;/productname&gt;
    &lt;productid&gt;0x0256&lt;/productid&gt;
&lt;/deviceproductdef&gt;
...
&lt;device_only&gt;DeviceVendor::Apple, DeviceProduct::ExternalKeyboard&lt;/device_only&gt;


You get the various device IDs by opening Karabiner > Misc. &amp; Uninstall > EventViewer > Devices