Separate mouse and trackpad settings with Karabiner

This post (which is upvoted 26 times as of this writing) suggests using Karabiner to set separate scroll settings for a USB mouse and the laptop trackpad.

Karabiner seems to be a nice application, and I understand the suggested solution (don't remap trackpad settings, then reverse scroll settings on all pointing devices except previously excluded ones) but it doesn't work in my case because the USB mouse IS an Apple pointing device (it's an apple USB mouse).

There is an option "Don't remap an internal keyboard" but nothing about "internal trackpad". So really the question still stands; how to set different scrolling settings for the internal trackpad, and an external apple mouse?


Solution 1:

It seems that this answer along with its comments solves the problem using Karabiner. It's a bit complicated, so I'll post a full description here:

  • Open Karabiner > Preferences
  • Go to the tab "Misc & Uninstall"
  • Click "Launch EventViewer"
  • In the viewer, go to the tab "Devices"

You should see a table with several columns including "Vendor ID", "Product ID" and "Device Name".

Example device list in EventViewer

  • Identify your USB mouse in the "Device Name" column, and write down the corresponding "Vendor ID" and "Product ID"
  • Go back to the Karabiner > Preference > Misc & Uninstall and now click the button "Open private.xml"
  • This will open Finder where the file private.xml is, open it with your favourite text editor

Edit that file to look like this:

<?xml version="1.0"?>
<root>
    <devicevendordef>
        <vendorname>Apple</vendorname>
        <vendorid>0x05ac</vendorid>
    </devicevendordef>
    <deviceproductdef>
        <productname>USBMouse</productname>
        <productid>0x0304</productid>
    </deviceproductdef>
    <item>
        <name>USB Mouse Scroll Reverse</name>
        <identifier>myUsbMouseScrollReverse</identifier>
        <device_only>DeviceVendor::Apple, DeviceProduct::USBMouse</device_only>
        <autogen>__FlipScrollWheel__ Option::FLIPSCROLLWHEEL_VERTICAL, Option::FLIPSCROLLWHEEL_HORIZONTAL</autogen>
    </item>
</root>

Note that you should replace the fields vendorid and productid to the values you previously wrote down (from the EventViewer device list).

  • Save the file private.xml
  • Go back to the window Karabiner > Preferences and now select the tab "Change Keys"
  • Click the button on the top-right "Reload XML"
  • You should see a new entry in the table below with the name "USB Mouse Scroll Reverse" (or whatever name you set in the XML file)
  • Tick that box

That should be all!