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.

  • Karabiner lets you modify how your keyboard, keys, keyboard layouts, and key combinations behave. It is not designed to modify the mouse.
    – Tuesday
    Commented Jan 6, 2017 at 22:40
  • 1
    @timothymh Wrong! it works after some investigation!
    – klanomath
    Commented Jan 6, 2017 at 22:53
  • Why the downvote? I've done a lot of research before posting, the question is clear, judging from other questions and meta-discussions it seems on topic.
    – aioobe
    Commented Jan 6, 2017 at 22:58

1 Answer 1


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).

  1. Download, install and open Karabiner
  2. Open in the menulet Karabiner -> Preferences
  3. Open the tab Misc & Uninstall
  4. Hit the button Open private.xml
  5. Open the file private.xml with an appropriate editor
  6. Enter the customized keycode

    <?xml version="1.0"?>
        <name>3rd-Party Pointing Device</name>
            <name>Reverse Vertical &amp; Horizontal Cursor Movement</name>

    If you already have other items in private.xml omit the first two and the last line of the above code.

  7. Save the file

  8. Open in the menulet Karabiner -> Preferences the tab Change Key
  9. Hit the ReloadXML button
  10. Enable the remapping. It should be listed at the beginning.

enter image description here

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):

<device_only>DeviceVendor::Apple, DeviceProduct::ExternalKeyboard</device_only>

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

  • Amazing. You found it. Precisely what I was looking for. Tested it and confirmed that it works.
    – aioobe
    Commented Jan 6, 2017 at 23:01
  • Does someone know how to do this in more recent versions of karabiner which is configured using json format?
    – aioobe
    Commented Nov 16, 2021 at 10:15
  • Seems not to be a way to configure it on new versions. This question has been also pointed on its github project with no response: github.com/pqrs-org/Karabiner-Elements/issues/2440
    – Manu
    Commented Sep 11, 2022 at 7:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .