Inverting mouse axis using Karabiner
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